I wanted to share this tool I built because it's been very useful to me when working with designers. You drag and drop an image into it and it will tell you the top colors with Android, Swift, and CSS code for using the color. Check it out: https://codepen.io/blixt/pen/VvYPOm 
author | blixt2 |
---|---|
permlink | i-made-a-tool-that-lets-designers-programmers-get-top-colors-from-a-screenshot-or-design |
category | programming |
json_metadata | {"tags":["programming","design","android","ios","css"],"image":["https://steemitimages.com/DQmdmpWmXSfENRt4UtaNqFduUqCgrkhyRvcxC6tYmK7738B/Screen%20Shot%202017-08-27%20at%202.38.20%20PM.png"],"links":["https://codepen.io/blixt/pen/VvYPOm"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-08-27 18:40:30 |
last_update | 2017-08-27 18:40:30 |
depth | 0 |
children | 11 |
last_payout | 2017-09-03 18:40:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.640 HBD |
curator_payout_value | 0.176 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 448 |
author_reputation | 3,757,878,226 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,050,023 |
net_rshares | 201,592,765,276 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
nickfost | 0 | 1,079,360,440 | 32% | ||
sarahsepia | 0 | 69,969,263 | 32% | ||
notabot04 | 0 | 206,150,733 | 32% | ||
the.assassin | 0 | 201,808,258 | 32% | ||
dotty1112 | 0 | 534,369,078 | 32% | ||
mattuk | 0 | 876,518,047 | 32% | ||
dune69 | 0 | 1,831,497,048 | 32% | ||
scrooger | 0 | 7,808,344,397 | 32% | ||
steem.chess | 0 | 2,713,406,529 | 32% | ||
bangkokbrit | 0 | 882,184,322 | 32% | ||
imransoudagar | 0 | 764,999,657 | 32% | ||
pilcrow | 0 | 27,531,198,510 | 50% | ||
lebelienk | 0 | 198,444,605 | 32% | ||
jonbit | 0 | 566,307,690 | 32% | ||
nabilanazir | 0 | 206,527,964 | 32% | ||
twoitguys | 0 | 268,425,888 | 32% | ||
sehrishfatima | 0 | 213,926,900 | 32% | ||
samfranky | 0 | 2,445,761,516 | 32% | ||
vicbarnes | 0 | 2,713,869,414 | 32% | ||
jeanlucpicard | 0 | 2,446,447,708 | 32% | ||
bigdeej | 0 | 85,997,607,846 | 32% | ||
darreng0531 | 0 | 382,412,881 | 32% | ||
samdenton | 0 | 2,445,299,096 | 32% | ||
ianworthington | 0 | 2,713,818,193 | 32% | ||
haileytennet | 0 | 2,445,536,684 | 32% | ||
sarahburton | 0 | 2,752,830,605 | 32% | ||
kerrytunsbridge | 0 | 2,444,757,759 | 32% | ||
danpilkington | 0 | 202,471,353 | 32% | ||
janebarrow | 0 | 200,359,929 | 32% | ||
frankholden | 0 | 2,445,061,383 | 32% | ||
jerrysmith | 0 | 2,444,586,149 | 32% | ||
neilpatel | 0 | 2,444,744,621 | 32% | ||
amazingclaire | 0 | 2,444,533,354 | 32% | ||
aphael | 0 | 201,863,721 | 32% | ||
shaivpidadi | 0 | 474,229,431 | 32% | ||
jaynene | 0 | 763,900,527 | 32% | ||
larrydavid4 | 0 | 27,006,387,473 | 32% | ||
orangejuicee | 0 | 198,431,190 | 32% | ||
jcramos | 0 | 1,067,537,955 | 32% | ||
foody | 0 | 217,200,121 | 32% | ||
yennad.atkun529 | 0 | 198,246,400 | 32% | ||
public-money | 0 | 454,578,830 | 32% | ||
grandpawhale | 0 | 199,381,701 | 32% | ||
thegoodquote | 0 | 200,083,419 | 32% | ||
paced.financial | 0 | 198,338,898 | 32% | ||
woetez | 0 | 1,014,978,945 | 32% | ||
saintsweeto | 0 | 201,112,648 | 32% | ||
shadowbot | 0 | 581,515,389 | 32% | ||
ahmedhani | 0 | 514,968,652 | 32% | ||
godspeedexe | 0 | 1,105,384,834 | 32% | ||
aidefr | 0 | 373,333,785 | 32% | ||
blixt2 | 0 | 372,142,433 | 32% | ||
sophie-eva | 0 | 405,430,724 | 32% | ||
ckbahdon | 0 | 378,317,730 | 32% | ||
prettyrose | 0 | 371,400,373 | 32% | ||
pjhom | 0 | 1,056,264,607 | 32% | ||
simplicityiskey | 0 | 371,399,270 | 32% | ||
extreme1728 | 0 | 371,399,259 | 32% | ||
essaki1983 | 0 | 371,399,141 | 32% | ||
ricardovice | 0 | 0 | 100% |
Nice! Can you explain a little bit how you did this? I'm curious to learn how it works.
author | pilcrow |
---|---|
permlink | re-blixt2-i-made-a-tool-that-lets-designers-programmers-get-top-colors-from-a-screenshot-or-design-20170828t085057720z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2017-08-28 08:51:06 |
last_update | 2017-08-28 08:51:06 |
depth | 1 |
children | 1 |
last_payout | 2017-09-04 08:51:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 87 |
author_reputation | 2,531,070,549,481 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,103,096 |
net_rshares | 0 |
Sure! The principle is very simple, it just scans the entire image and counts up the number of equal colored pixels. Then it sorts the resulting map by number of instances (descending, so most common color is at the top) and trims the list at 100 before displaying it in the UI. The rest is a bunch of JavaScript specific stuff, like getting the blob from drag & drop result, reading bytes from the canvas buffer, using promises to split up asynchronous parts, and so on. For gleaning into that it's probably best to skim through the code, it's written in ES6 flavor and should be fairly readable!
author | blixt2 |
---|---|
permlink | re-pilcrow-re-blixt2-i-made-a-tool-that-lets-designers-programmers-get-top-colors-from-a-screenshot-or-design-20170828t144731209z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2017-08-28 14:47:30 |
last_update | 2017-08-28 14:47:30 |
depth | 2 |
children | 0 |
last_payout | 2017-09-04 14:47:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 598 |
author_reputation | 3,757,878,226 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,130,628 |
net_rshares | 0 |
Congratulations @blixt2! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@blixt2) Award for the number of upvotes Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20170830t222526000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2017-08-30 22:25:27 |
last_update | 2017-08-30 22:25:27 |
depth | 1 |
children | 0 |
last_payout | 2017-09-06 22:25:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 682 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,386,465 |
net_rshares | 0 |
Congratulations @blixt2! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@blixt2) Award for the number of upvotes Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20170902t012130000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2017-09-02 01:21:30 |
last_update | 2017-09-02 01:21:30 |
depth | 1 |
children | 0 |
last_payout | 2017-09-09 01:21:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 682 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,603,742 |
net_rshares | 0 |
Congratulations @blixt2! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@blixt2) Award for the number of upvotes received Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20170903t075538000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2017-09-03 07:55:36 |
last_update | 2017-09-03 07:55:36 |
depth | 1 |
children | 0 |
last_payout | 2017-09-10 07:55:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 691 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,720,591 |
net_rshares | 0 |
Congratulations @blixt2! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@blixt2) Award for the number of upvotes Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20170904t040523000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2017-09-04 04:05:21 |
last_update | 2017-09-04 04:05:21 |
depth | 1 |
children | 0 |
last_payout | 2017-09-11 04:05:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 682 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,807,344 |
net_rshares | 0 |
Congratulations @blixt2! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@blixt2) Award for the number of upvotes Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20170916t104038000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2017-09-16 10:40:36 |
last_update | 2017-09-16 10:40:36 |
depth | 1 |
children | 0 |
last_payout | 2017-09-23 10:40:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 682 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,044,562 |
net_rshares | 0 |
Congratulations @blixt2! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@blixt2) Award for the number of upvotes Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20170929t181518000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2017-09-29 18:15:18 |
last_update | 2017-09-29 18:15:18 |
depth | 1 |
children | 0 |
last_payout | 2017-10-06 18:15:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 682 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 16,304,384 |
net_rshares | 0 |
Congratulations @blixt2! You have completed the following achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@blixt2) Award for the number of upvotes <sub>_Click on the badge to view your Board of Honor._</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> **Do not miss the last post from @steemitboard:** [SteemitBoard and the Veterans on Steemit - The First Community Badge.](https://steemit.com/veterans/@steemitboard/steemitboard-and-the-veterans-on-steemit-the-first-community-badge) > Do you like [SteemitBoard's project](https://steemit.com/@steemitboard)? Then **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20180824t015842000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2018-08-24 01:58:42 |
last_update | 2018-08-24 01:58:42 |
depth | 1 |
children | 0 |
last_payout | 2018-08-31 01:58:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 900 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 69,179,455 |
net_rshares | 0 |
Congratulations @blixt2! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) : <table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@blixt2/votes.png?201812200224</td><td>You made more than 5000 upvotes. Your next target is to reach 6000 upvotes.</td></tr> </table> <sub>_[Click here to view your Board of Honor](https://steemitboard.com/@blixt2)_</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20181220t031631000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2018-12-20 03:16:30 |
last_update | 2018-12-20 03:16:30 |
depth | 1 |
children | 0 |
last_payout | 2018-12-27 03:16:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 750 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 77,101,209 |
net_rshares | 0 |
Congratulations @blixt2! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@blixt2/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@blixt2) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=blixt2)_</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
author | steemitboard |
---|---|
permlink | steemitboard-notify-blixt2-20190818t184109000z |
category | programming |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2019-08-18 18:41:09 |
last_update | 2019-08-18 18:41:09 |
depth | 1 |
children | 0 |
last_payout | 2019-08-25 18:41:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 612 |
author_reputation | 38,975,615,169,260 |
root_title | "I made a tool that lets designers/programmers get top colors from a screenshot or design" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 89,674,738 |
net_rshares | 0 |