Skip to content

rgba r,g,b values of 1 interpreted as 255

my_object = self.svg.selected[0]

my_object.style.set_color('rgba(0, 0, 0, 1)') -- Colour is black (fill:#000000)

my_object.style.set_color('rgba(1, 0, 0, 1)') or (0, 1, 0, 1) or (0, 0, 1, 1) -- results in fill:#ff0000 or fill:#00ff00 or fill:#0000ff

my_object.style.set_color('rgba(2, 0, 0, 1) etc -- results in correct fill:#020000


Inkscape 1.1 (1:1.1+202105261518+ce6663b3b7) Ubuntu 20.10

Edited by Inklinea
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information