Computer Science Canada Turing Color To Html Color |
Author: | s3ven [ Wed Jun 09, 2010 9:14 pm ] | ||
Post subject: | Turing Color To Html Color | ||
What is it you are trying to achieve? Hello, I am basically trying to convert the turing RGB color number into a format where it can be convert into html and read properly. What is the problem you are having? for example - Color White in turing is "0" but if i put the 0 into html code snippet it wouldn't work because html only reads hex/etc therefore not giving me the desire color. Describe what you have tried to solve this problem I was going to rephrase my question for the time being allowing the user to enter in the color in words: example - "red" instead of 14 or whatever but I plan to use a color chart with my class assignment to allow the user to have more variety. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using I am using the latest version of turing |
Author: | DtY [ Wed Jun 09, 2010 9:21 pm ] |
Post subject: | RE:Turing Color To Html Color |
There's not really any way. That said, Turing colours are just numbers that internally map to a colour that is displayed on screen. They don't mean anything outside of Turing (just imagine, on a piece of paper, you decide that 1 will be red, 2 will be green, &c, these numbers don't mean anything outside of that paper). However, if you draw something onto the screen of a specific colour, it will be looked up in that table, and drawn on the screen in the right colour. If you take a screenshot, you can use an image editor (or some viewers) to get the colour in a format that can be converted to an html colour code. If you use The Gimp, you can open the image, and use the eye dropper to select a colour from the image. Once that colour is active, if you open the colour selection dialog (double click the colour swatch), there is a text box with the html colour code for that colour. Other than that, you may be able to find one that someone else has already made. |
Author: | Insectoid [ Wed Jun 09, 2010 9:22 pm ] |
Post subject: | RE:Turing Color To Html Color |
Turing actually has an RGB module that you can access to create hex colors Something like RGB.addcolor (#FFFFFF). I don't remember the exact syntax, look it up in the F10 help. EDIT: Sneaky bastard, you beat me! |