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
Any ideas on how to make results more interesting? Maybe convert to Lab colorspace (I failed to calculate resulting colors from out_array)? The first (most dominant) color is detected almost identically, though.
Also, I noticed that value from out_array is not always the same that the maximum in $pixel array at desired index. Is it okay, or am I doing somenting wrong?
#0 value from `out_array`: 35085
#0 max value from `pixel`: 35085
#1 value from `out_array`: 16213
#1 max value from `pixel`: 16213
#2 value from `out_array`: 8410 // value from `out_array` differs from pixel’s max
#2 max value from `pixel`: 16213 //
#3 value from `out_array`: 5369
#3 max value from `pixel`: 5369
#4 value from `out_array`: 5185
#4 max value from `pixel`: 5185
#5 value from `out_array`: 5055 // value from `out_array` differs from pixel’s max
#5 max value from `pixel`: 35085 //
#6 value from `out_array`: 5027
#6 max value from `pixel`: 5027
#7 value from `out_array`: 4908
#7 max value from `pixel`: 4908
#8 value from `out_array`: 4786
#8 max value from `pixel`: 4786
#9 value from `out_array`: 4706
#9 max value from `pixel`: 4706
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Thanks to the discussion with @jcupitt in the gist I came up with something like:
I use
VIPS
andLeague\ColorExtractor
here for comparison. Palette is generated to HTML for visual guidance. The result is:Image from: https://lokeshdhakar.com/projects/color-thief/
Any ideas on how to make results more interesting? Maybe convert to Lab colorspace (I failed to calculate resulting colors from
out_array
)? The first (most dominant) color is detected almost identically, though.Also, I noticed that value from
out_array
is not always the same that the maximum in$pixel
array at desired index. Is it okay, or am I doing somenting wrong?Beta Was this translation helpful? Give feedback.
All reactions