473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

rgb() ?


I found a javasript program on the web, it has the following call to
rgb() which is not in my javascript manual. What is it and what is the
+red+ notation ?

this.span.childNodes[i].style.color="rgb("+red+", "+grn+", "+blu+")";

Dec 27 '06 #1
2 1688
surf wrote:
I found a javasript program on the web, it has the following call to
rgb() which is not in my javascript manual. What is it and what is the
+red+ notation ?

this.span.childNodes[i].style.color="rgb("+red+", "+grn+", "+blu+")";
A CSS rgb color value is assigned. The + is just doing string
concatenation to construct a string value on the right side of the
assignment.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 27 '06 #2
ASM
surf a écrit :
I found a javasript program on the web, it has the following call to
rgb() which is not in my javascript manual. What is it and what is the
+red+ notation ?

this.span.childNodes[i].style.color="rgb("+red+", "+grn+", "+blu+")";

color = '#f3c409';
same as :
color = 'rgb(243, 196, 9)';
same as :
color = 'rgb(95.5%, 77%, 3.7%)';
http://stephane.moriaux.perso.orange...couleurs.shtml
http://stephane.moriaux.perso.orange...s_palette_gimp

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Dec 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Oracle3001 | last post by:
Hi All, I want to take an image maybe in a jpeg or gif format or rgb and convert it to a series of CMYK images (one for each colour). If there an easy way using the API of java 2, or JAI. If not...
4
by: Johan Holst Nielsen | last post by:
Hi all, I hope someone can help me. I have do do a color conversion from RGB to CMYK. It's harder than I thought :D Anyway, here is my problem. I tried some differents ways to do it - I...
2
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643...
3
by: Rich | last post by:
I need to change my form's backcolor back to the design color after it changes to another system.Drawing.Color. In the backcolor design, the value is in RGB me.BackColor = ...RGB(255, 255, 192)...
4
by: Sugapablo | last post by:
Take a look at this page if you will: http://www.sugapablo.net/temp/colortest.html Does it look right to you? Should #0000ff and #000fff be the same shade of blue? Especially since #ff0000 is...
8
by: teresni | last post by:
We've got some JavaScript code that gets the current background color. It works, but Netscape returns it in rgb format, while IE returns it as the color text name (e.g., 'white'). We need to do...
7
by: anuragkhanna8 | last post by:
Hi, I am trying to convert a 16 bit rgb value to 32 bit, however the new color generated is different from the 16 bit rgb data. Please let me know the formula to convert an 16 bit rgb data to 32...
6
Robbie
by: Robbie | last post by:
Hi. I've made 2 functions which play around with colours. They convert a 'colour number' (I don't know what the proper name for it is, so I call it this - the Long given back by RGB(),...
4
by: cjlopesmartins | last post by:
Hi Please help I have this mysql table field with a RGB value like 120-10-200 and I nead this php function to convert this value into html color #?????? Thanks in advance
2
by: Sodrohu | last post by:
Currently I got a thermal image mapping program which converts grayscale pictures to RGB. Now, what I need to do is to convert those 3 RGB colors into other three colours. The choice of colours are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.