|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Jan 29, 2008 8:43 am
Comparative Color Generator |
Want perfect color co-ordination in your settings?
Function: To display three colors together randomly allowing you to cycle through or keep colors that match your preference.
Purpose: Because three, perhaps unusual, still nicely co-ordinated colors are preferable to happenstance matching
Why This: A person can not imagine all the combinations that are available. This script uses chance to suggest combinations, and
proximity to pair colors.
Who Cares: Me, and perhaps people standing in a paint store. Use this script to do room colors if you like.
Required: Some understanding of what looks good versus what looks better with regard to color. Or at least a care for such a thing.
command: SeeColor
parameters: None; #1, #2, or #3; any color name
What this does is randomly generate three color examples from a list of 140.
You can select or deselect by number or name.
You can add any name from the string list, that is past colors may look good with present conditions. eg.
SeeColor Firebrick sets firebrick to be matched or matches firebrick to the set.
When you have set 2 colors you change from random generation to fixed items #1 to #140.
When you choose the 3rd color you reset.
I put a bit of code under an empty #if (@I_Do_DB) statement. That creates a database, change
that to 1 or something if you would like to save your results. You could use an input I suppose
for the titles and description. Notepad works as well though, just I don't expect people need much
of a DB of this sorts
1. Make a folder named Colors or change the class statement
2. Paste the folowing part in the "Colors" folder as an alias named "SeeColor":
Code: |
#class colors
#if (%1) {
#sh " "
#var PRH_ColParam %lower( %1)
#if (@PRH_ColParam = "reset") {
#unvar PRH_ColSet
#unvar PRH_ColParam
}
#if (%isnumber( @PRH_ColParam)) {
#var PRH_FocCol %item( @PRH_ColUnSet, @PRH_ColParam)
#if (%ismember( @PRH_FocCol, @PRH_ColSet)) {#deli PRH_ColSet @PRH_FocCol} {#if (%ismember( @PRH_FocCol, @PRH_ColUnSet)) {#addi PRH_ColSet @PRH_FocCol}}
#unvar PRH_FocCol
}
#if (%ismember( @PRH_ColParam, @PRH_ColSet)) {#deli PRH_ColSet @PRH_ColParam} {#if (%ismember( @PRH_ColParam, @colorbunch)) {#addi PRH_ColSet @PRH_ColParam}}
#if (%numitems( @PRH_ColSet) = 3) {
#sh " "
#sh %format( " &-28s", Super Happy Color Time~!)
#co %item( @PRH_ColSet, 1)
#sh %format( " &-28s", Don~'t stop~! No Yes No Yes)
#co %item( @PRH_ColSet, 2)
#sh %format( " &-28s", Colors~! Oh Colors~!)
#co %item( @PRH_ColSet, 3)
#if (@I_Do_DB) {
#ADDKEY MySuperHappyColorsDB %concat( "SomeTitle_", %eval( %numkeys( @MySuperHappyColorsDB) + 1)) "description"
#forall @PRH_ColSet {#addkey MySuperHappyColorsDB %concat( "color", %eval( %numkeys( @MySuperHappyColorsDB) + 1)) %i}
}
#sh " "
}
#if (%numitems( @PRH_ColSet) > 2) {
#unvar PRH_ColSet
#unvar PRH_ColUnSet
#unvar prh_colcount
#unvar PRH_ColParam
#unvar PRH_FocCol
} {#if (%numitems( @PRH_ColSet) != 2) {#unvar prh_colcount}}
}
#var PRH_ColUnSet @PRH_ColSet
#if (%numitems( @PRH_ColSet) = 2) {
#if (@prh_colcount >= %numitems( @colorbunch)) {
#sh %format( " &-26s", That~'s all of them~.)
#co grey
#sh " "
#var prh_colcount 1
} {#add prh_colcount 1}
#sh %format( " &35s", @prh_colcount~/%numitems( @colorbunch))
#co grey
#sh " "
#if (%ismember( %item( @colorbunch, @prh_colcount), @PRH_ColUnSet)) {
#sh %format( " &-26s", repeated color...)
#co %item( @colorbunch, @prh_colcount)
#sh " "
}
#addi PRH_ColUnSet %item( @colorbunch, @prh_colcount)
} {#loop %eval( 3 - %numitems( @PRH_ColSet)) {#addi PRH_ColUnSet %item( @colorbunch, %random( 1, 140))}}
#loop %numitems( @PRH_ColUnSet) {
#sh %format( " &2s &-26s &-28s", %string( %i), %proper( %item( @PRH_ColUnSet, %i)), The big brown dog jumped over the lazy fox~.)
#co %item( @PRH_ColUnSet, %i)
#if (%item( @PRH_ColUnSet, %i) = "black") {
#sh %format( " &-28s", ooooops~, color is black)
#co grey
}
}
#sh " "
#input "SeeColor "
#class 0 |
3. Paste this part in a variable named "colorbunch":
Code: |
black|maroon|darkorange|red|orangered|darkgreen|darkred|green|olive|orange|gold|lawngreen|lime|chartreuse|yellow|darkgoldenrod|saddlebrown|chocolate|goldenrod|firebrick|forestgreen|olivedrab|brown|sienna|darkolivegreen|greenyellow|limegreen|yellowgreen|crimson|peru|tomato|darkslategray|coral|seagreen|indianred|sandybrown|dimgray|darkkhaki|midnightblue|mediumseagreen|salmon|darksalmon|lightsalmon|springgreen|navy|purple|teal|gray|lightcoral|indigo|mediumvioletred|burlywood|darkblue|darkmagenta|darkslateblue|darkcyan|tan|khaki|rosybrown|darkseagreen|slategray|lightgreen|deeppink|palevioletred|palegreen|lightslategray|mediumspringgreen|cadetblue|darkgray|lightseagreen|mediumaquamarine|palegoldenrod|navajowhite|wheat|hotpink|steelblue|moccasin|peachpuff|silver|lightpink|bisque|pink|darkorchid|mediumturquoise|mediumblue|slateblue|blanchedalmond|lemonchiffon|turquoise|darkturquoise|lightgoldenrodyellow|darkviolet|mediumorchid|lightgrey|aquamarine|papayawhip|orchid|antiquewhite|thistle|mediumpurple|gainsboro|beige|cornsilk|plum|lightsteelblue|lightyellow|royalblue|mistyrose|blueviolet|lightblue|powderblue|linen|oldlace|skyblue|cornflowerblue|mediumslateblue|violet|paleturquoise|seashell|floralwhite|honeydew|ivory|lavenderblush|whitesmoke|lightskyblue|lavender|snow|mintcream|blue|fuchsia|magenta|dodgerblue|deepskyblue|aliceblue|ghostwhite|aqua|cyan|lightcyan|azure|white |
__________________________
This is an export that may work:
Code: |
#ALIAS seecolor {#class colors;#if (%1) {#sh " ";#var PRH_ColParam %lower( %1);#if (@PRH_ColParam = "reset") {#unvar PRH_ColSet;#unvar PRH_ColParam};#if (%isnumber( @PRH_ColParam)) {#var PRH_FocCol %item( @PRH_ColUnSet, @PRH_ColParam);#if (%ismember( @PRH_FocCol, @PRH_ColSet)) {#deli PRH_ColSet @PRH_FocCol} {#if (%ismember( @PRH_FocCol, @PRH_ColUnSet)) {#addi PRH_ColSet @PRH_FocCol}};#unvar PRH_FocCol};#if (%ismember( @PRH_ColParam, @PRH_ColSet)) {#deli PRH_ColSet @PRH_ColParam} {#if (%ismember( @PRH_ColParam, @colorbunch)) {#addi PRH_ColSet @PRH_ColParam}};#if (%numitems( @PRH_ColSet) = 3) {#sh " ";#sh %format( " &-28s", Super Happy Color Time~!);#co %item( @PRH_ColSet, 1);#sh %format( " &-28s", Don~'t stop~! No Yes No Yes);#co %item( @PRH_ColSet, 2);#sh %format( " &-28s", Colors~! Oh Colors~!);#co %item( @PRH_ColSet, 3);#if (@I_Do_DB) {#ADDKEY MySuperHappyColorsDB %concat( "SomeTitle_", %eval( %numkeys( @MySuperHappyColorsDB) + 1)) "description";#forall @PRH_ColSet {#addkey MySuperHappyColorsDB %concat( "color", %eval( %numkeys( @MySuperHappyColorsDB) + 1)) %i}};#sh " "};#if (%numitems( @PRH_ColSet) > 2) {#unvar PRH_ColSet;#unvar PRH_ColUnSet;#unvar prh_colcount;#unvar PRH_ColParam;#unvar PRH_FocCol} {#if (%numitems( @PRH_ColSet) != 2) {#unvar prh_colcount}}};#var PRH_ColUnSet @PRH_ColSet;#if (%numitems( @PRH_ColSet) = 2) {#if (@prh_colcount >= %numitems( @colorbunch)) {#sh %format( " &-26s", That~'s all of them~.);#co grey;#sh " ";#var prh_colcount 1} {#add prh_colcount 1};#sh %format( " &35s", @prh_colcount~/%numitems( @colorbunch));#co grey;#sh " ";#if (%ismember( %item( @colorbunch, @prh_colcount), @PRH_ColUnSet)) {#sh %format( " &-26s", repeated color...);#co %item( @colorbunch, @prh_colcount);#sh " "};#addi PRH_ColUnSet %item( @colorbunch, @prh_colcount)} {#loop %eval( 3 - %numitems( @PRH_ColSet)) {#addi PRH_ColUnSet %item( @colorbunch, %random( 1, 140))}};#loop %numitems( @PRH_ColUnSet) {#sh %format( " &2s &-26s &-28s", %string( %i), %proper( %item( @PRH_ColUnSet, %i)), The big brown dog jumped over the lazy fox~.);#co %item( @PRH_ColUnSet, %i);#if (%item( @PRH_ColUnSet, %i) = "black") {#sh %format( " &-28s", ooooops~, color is black);#co grey}};#sh " ";#input "SeeColor ";#class 0} "Colors"
#VAR colorbunch {black|maroon|darkorange|red|orangered|darkgreen|darkred|green|olive|orange|gold|lawngreen|lime|chartreuse|yellow|darkgoldenrod|saddlebrown|chocolate|goldenrod|firebrick|forestgreen|olivedrab|brown|sienna|darkolivegreen|greenyellow|limegreen|yellowgreen|crimson|peru|tomato|darkslategray|coral|seagreen|indianred|sandybrown|dimgray|darkkhaki|midnightblue|mediumseagreen|salmon|darksalmon|lightsalmon|springgreen|navy|purple|teal|gray|lightcoral|indigo|mediumvioletred|burlywood|darkblue|darkmagenta|darkslateblue|darkcyan|tan|khaki|rosybrown|darkseagreen|slategray|lightgreen|deeppink|palevioletred|palegreen|lightslategray|mediumspringgreen|cadetblue|darkgray|lightseagreen|mediumaquamarine|palegoldenrod|navajowhite|wheat|hotpink|steelblue|moccasin|peachpuff|silver|lightpink|bisque|pink|darkorchid|mediumturquoise|mediumblue|slateblue|blanchedalmond|lemonchiffon|turquoise|darkturquoise|lightgoldenrodyellow|darkviolet|mediumorchid|lightgrey|aquamarine|papayawhip|orchid|antiquewhite|thistle|mediumpurple|gainsboro|beige|cornsilk|plum|lightsteelblue|lightyellow|royalblue|mistyrose|blueviolet|lightblue|powderblue|linen|oldlace|skyblue|cornflowerblue|mediumslateblue|violet|paleturquoise|seashell|floralwhite|honeydew|ivory|lavenderblush|whitesmoke|lightskyblue|lavender|snow|mintcream|blue|fuchsia|magenta|dodgerblue|deepskyblue|aliceblue|ghostwhite|aqua|cyan|lightcyan|azure|white} {_nodef} "Colors" |
|
|
Last edited by Leitia on Tue Jan 29, 2008 2:29 pm; edited 3 times in total |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Jan 29, 2008 8:47 am |
oh crud, I forgot to implement the extra reset statement, don't use that, or at least I doubt it would work
|
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Jan 29, 2008 8:57 am |
also I think the fox traditionally jumps over the dog or something, but I like this as well
|
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Jan 29, 2008 9:43 am |
I will try to stop commenting
|
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Jan 29, 2008 10:19 am |
[not current]
|
|
Last edited by Leitia on Wed Jan 30, 2008 12:18 am; edited 1 time in total |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jan 29, 2008 12:57 pm |
I added some code tags to preserve those spaces. In future, use them any time you want to keep spacing. Also, if you have something to add to a thread and you're the previous poster (unless it's been a long time since your previous post), just edit the old post.
Finally, I'd like to add that I still have no idea what the point of this script is. Some more information on what it's for would be lovely. |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Jan 29, 2008 2:05 pm |
I don't know what a 'code tag' is, but they sound lovely, (not being sarcastic, I like the word) and I will return to my first post to provide more info (as you suggest).
|
|
Last edited by Leitia on Tue Jan 29, 2008 3:07 pm; edited 1 time in total |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jan 29, 2008 2:34 pm |
Thanks for that - now I know what it's for, I actually really like the idea, sounds very useful. Thanks for posting it.
|
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Jan 29, 2008 3:11 pm |
Wow, I am very happy then. In my experiance the wrong colors in triggers are a nightmare, while amusing ones make even the mundane job of harvesting plants (I am a druid) enjoyable
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jan 29, 2008 4:23 pm |
Yeah, I spent ages on sites like ColorSchemer trying to come up with nifty colour schemes. At times I wonder if just spamming out lots of possible schemes and seeing what I liked best wouldn't have been a better way :P
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|