mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-12 16:53:07 +00:00
fixed wrong color getting stored in array (similar fix to #1108.)
This commit is contained in:
parent
dc000f7267
commit
1b8301ae72
|
@ -80,7 +80,12 @@ func update_palette() -> void:
|
|||
palette.resize(current_palette.colors_max)
|
||||
palette.fill(TRANSPARENT)
|
||||
for i in current_palette.colors:
|
||||
palette[i] = current_palette.colors[i].color
|
||||
# Due to the decimal nature of the color values, some values get rounded off
|
||||
# unintentionally.
|
||||
# Even though the decimal values change, the HTML code remains the same after the change.
|
||||
# So we're using this trick to convert the values back to how they are shown in
|
||||
# the palette.
|
||||
palette[i] = Color(current_palette.colors[i].color.to_html())
|
||||
|
||||
|
||||
## Displays the actual RGBA values of each pixel in the image from indexed mode.
|
||||
|
|
Loading…
Reference in a new issue