Full Color Palette? - Сообщения
I would know the names of available colors for use in 2D canvas text. I was trying with the following:
"Red", "Orange", "Yellow", "Lime", "green", "Turquoise", "Cyan", "blue", "violet", "purple", "magenta", "lime", "brown", "pink", "indigo", "grey", "black", "white", and combinations as "light yellow", "dark violet", "pale green" and so on.
Please, would you post a complete list of colors?
It´s possible to define colors in RGB format?
Thanks in advance,
Oscar
The complete list of colors for the 2D canvas would be welecome. Morover, I wonder if there might be a way to use integer numbers as alias in addition instead of color names.
Regards,
Radovan
Here is a complete list of possible colors (spaces and upper case letters are not matter):
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, "blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen, black
FYI: You can use darkblue, DarkBlue, Dark Blue (recommended), DARKBLUE, D a R k B l U e ant etc. - all spaces will be removed and color name will be converted to lower case chars.
You can use number instead of color name as well. Number composing rule is a bit complex, but it is similar with web-colors: color represented as a hexadecimal number where first pair is a Red Component, second pair is a Green Component and third pair is a Blue Component. For example 00FF00 is a Green color, CCCCCC - something Gray and etc. When you have a hexadecimal number you need to convert it to decimal number to use it in SMath Studio (f.e. Green = 00FF00 = 65280).
Best regards.
Only a little question: I was trying with numbres instead color names, but no result. I tryed the following:

Yeah, I know, this is interesting task for user to generate such color number

Regards.
Quite a complicated numbering color scheme. I will certainly give up using those numbers.
As I could see there is about 140 colors in the color list (if I count them well). I thought if there might be a way in SMath to internally have integers from 1 to 140 representing those colors and to put, say, 2 instead of "antiquewhite". But it seems it is not going to work because the fifth column of the plot matrix expects the number based on the above defined numbering color scheme.
Never mind, I think we will stick with the color list

Regards,
Radovan
Note, that you're able to set any possible opacity for the color or not to specify it at all (in that case color will be non-transparent). See screenshot above for example.
Regards.

Snippet: RGBcolor.sm
Regards,
Oscar
WroteThank you so much Andrey, I was working in this idea, so here is my version (using some lines of your code
):
[...]
Snippet: RGBcolor.sm
Regards,
Oscar
Hi,
I used your snippet to develop one that behaves similarly to the functions rgb and rgba used for websites (CSS3 behavior compatible)

r,g,b must have values from 0 to 255; alpha value must be from 0.0 to 1.0.
Decimal numbers in r,g,b does not cause the blocking of the function, like negative values or values greater than 255 (or 1.0).
here is the snippet: RGB-RGBA colors.zip
here is the *.sm example shown in the figure: RGB-RGBA test.zip
regards,
w3b5urf3r
WroteHello.
Here is a complete list of possible colors (spaces and upper case letters are not matter):aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, "blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen, black
FYI: You can use darkblue, DarkBlue, Dark Blue (recommended), DARKBLUE, D a R k B l U e ant etc. - all spaces will be removed and color name will be converted to lower case chars.
You can use number instead of color name as well. Number composing rule is a bit complex, but it is similar with web-colors: color represented as a hexadecimal number where first pair is a Red Component, second pair is a Green Component and third pair is a Blue Component. For example 00FF00 is a Green color, CCCCCC - something Gray and etc. When you have a hexadecimal number you need to convert it to decimal number to use it in SMath Studio (f.e. Green = 00FF00 = 65280). You can also try to go here https://create.vista.com/colors/palettes/galaxy-color-palette/ and choose the right palette of colors for yourself, and there each color clearly has its correct name, and pull them out there for yourself, I think this can help.
Best regards.
Thank you very much for your advice, I think that this can help me too, it's cool that there is such a site with color palettes, it really simplifies life.
Is it possible to pass the four values to the rgba(r, g, b, a) function as variables? I'm currently having the problem that after the function is called the variables have become strings "ff" style.
WroteWroteThank you so much Andrey, I was working in this idea, so here is my version (using some lines of your code
):
[...]
...r,g,b must have values from 0 to 255; alpha value must be from 0.0 to 1.0.
Decimal numbers in r,g,b does not cause the blocking of the function, like negative values or values greater than 255 (or 1.0).
...
w3b5urf3r
Unfortunately, and as usual, it wasn't on-topic (Full Color Palette: specific question regarding parameters being handled with variables). This renders the extra content (kindly, but incorrectly provided) as SPAM that detracts from the value of the forum.
Jean, in the future please please review your responses to check they are on-topic (ie not SPAM) before hitting the 'POST' button.
WroteWroteIs it possible to pass the four values to the rgba(r, g, b, a) function as variables? I'm currently having the problem that after the function is called the variables have become strings "ff" style.
Image region is universal of 3 arguments.
There are other ways to set/adjust region of whatever ...
luminosity, opacity, transparency, transluslency ...
I suggested you to do same, it is only counter-measure we can take.


I wish to declare a color as green50 which is rgb green with 50% opacity.
green50:=(0,255,0,0.5)
and then use it (ie pass green50 as a variable) with Davide's rgba snippet:
rgba:=(green50)
Thanks in advance.
WroteOK, one more try:
I wish to declare a color as green50 which is rgb green with 50% opacity.
green50:=(0,255,0,0.5)
and then use it (ie pass green50 as a variable) with Davide's rgba snippet:
rgba:=(green50)
Thanks in advance.
If you just want to store the input to rgba() in a separate variable and apply it later, then you might use the at() substitution function. Yet it is not clear to me, why one would do that instead of just storing the resulting color string from rgba()
Blatt5.sm (3 КиБ) скачан 34 раз(а).
If you are reviewing this thread, you may notice some broken links, such as the following two files:
Wrote...
here is the snippet: RGB-RGBA colors.zip
here is the *.sm example shown in the figure: RGB-RGBA test.zip
...
Please note, these urls have evolved from http to https, thus the updated links to download those files are as follows:
- https://smath.com/wiki/GetFile.aspx?File=graphs%2fRGB-RGBA%20colors.zip
- https://smath.info/wiki/GetFile.aspx?File=graphs%2fRGB-RGBA%20test.zip
On that note, most of the contents contained within this thread have been summarized on the following WIKI:
- https://smath.com/wiki/Graphs.ashx
Hope this if of Good Help, and Merry Christmas!
- Kenny Lemens, P.E. ᵂᴵ
-
Новые сообщения
-
Нет новых сообщений