You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I just wanted to build a Matrix theme and noticed a very strange behavior.
The color "Neon green" from the Wikipedia palette returned randomly two different colors when using fmt.Println(palette.Wikipedia.Filter("Neon green")[0]).
As it turns out there are two different colors defined as "Neon green".
Not sure how you would like to handle this. This problem may also happen when using palettes that are .MixedWith other palettes containing same names.
Maybe it would help to sort the colors in some way, to have a deterministic order of the colors array returned by the .Filter
I did a search for other duplicates in the Wikipedia Palette:
Duplicate color in palette.Wikipedia Peach
{Peach {1 0.796078 0.643137} }
{Peach {1 0.898039 0.705882} }
Duplicate color in palette.Wikipedia Tea rose
{Tea rose {0.972549 0.513725 0.47451} }
{Tea rose {0.956863 0.760784 0.760784} }
Duplicate color in palette.Wikipedia Vermilion
{Vermilion {0.85098 0.219608 0.117647} }
{Vermilion {0.890196 0.258824 0.203922} }
Duplicate color in palette.Wikipedia Midnight blue
{Midnight blue {0 0.27451 0.54902} }
{Midnight blue {0.098039 0.098039 0.439216} }
Duplicate color in palette.Wikipedia Bronze
{Bronze {0.803922 0.498039 0.196078} }
{Bronze {0.533333 0.329412 0.043137} }
Duplicate color in palette.Wikipedia Royal red
{Royal red {0.607843 0.109804 0.192157} }
{Royal red {0.815686 0 0.376471} }
Duplicate color in palette.Wikipedia Dark imperial blue
{Dark imperial blue {0 0.078431 0.494118} }
{Dark imperial blue {0 0.254902 0.415686} }
Duplicate color in palette.Wikipedia Violet-red
{Violet-red {0.537255 0.078431 0.27451} }
{Violet-red {0.968627 0.32549 0.580392} }
Duplicate color in palette.Wikipedia Neon green
{Neon green {0.07451 0.607843 0.258824} }
{Neon green {0.223529 1 0.078431} }
Duplicate color in palette.Wikipedia Royal blue
{Royal blue {0 0.137255 0.4} }
{Royal blue {0.254902 0.411765 0.882353} }
Duplicate color in palette.Wikipedia Scarlet
{Scarlet {0.992157 0.054902 0.207843} }
{Scarlet {1 0.141176 0} }
Duplicate color in palette.Wikipedia Lemon lime
{Lemon lime {0.360784 1 0.403922} }
{Lemon lime {0.890196 1 0} }
Duplicate color in palette.Wikipedia Chinese red
{Chinese red {0.803922 0.027451 0.117647} }
{Chinese red {0.666667 0.219608 0.117647} }
The text was updated successfully, but these errors were encountered:
aligator
changed the title
Duplicates lead to random colors
Duplicates in Wikipedia lead to random colors
Dec 2, 2024
Hi I just wanted to build a Matrix theme and noticed a very strange behavior.
The color "Neon green" from the Wikipedia palette returned randomly two different colors when using
fmt.Println(palette.Wikipedia.Filter("Neon green")[0])
.As it turns out there are two different colors defined as "Neon green".
Not sure how you would like to handle this. This problem may also happen when using palettes that are
.MixedWith
other palettes containing same names.Maybe it would help to sort the colors in some way, to have a deterministic order of the colors array returned by the
.Filter
I did a search for other duplicates in the Wikipedia Palette:
The text was updated successfully, but these errors were encountered: