Last active
January 12, 2018 20:05
-
-
Save toomasv/19e45ce2cbd7dc213548400fcdec1f8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Needs: View | |
Acknowledgement: {Color extraction by @9214} | |
Author: "Toomas Vooglaid" | |
Date: 2018-01-11 | |
Purpose: {To easy picking Red predefined colors} | |
] | |
context [ | |
colors: exclude sort extract load help-string tuple! 2 [glass] | |
lay: copy [style color: base 70x70 font [size: 8] wrap top] | |
x: 0 | |
foreach j colors [ | |
fcol: either 3 = length? get j [255.255.255 - (get j) / 2]['black] | |
append lay compose/deep [ | |
color (j) | |
font [color: (fcol)] | |
(rejoin [form j #"^/" form get j]) | |
on-down [ | |
write-clipboard (form j) | |
tx/data: rejoin ["Color '" (to-lit-word j) "' (" (get j) ") copied to clipboard!"] | |
] | |
] | |
if (x: x + 1) % 10 = 0 [append lay 'return] | |
] | |
view append lay [tx: text 310x70 white "color" font [size: 12] wrap center] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment