光源

RGB(0-255)混色叠加模拟

时间:2024-05-12 18:27:58   作者:郑士利   来源:正势利   阅读:321   评论:0
内容摘要:可以根据R、G、B在不同强度混合后,模拟出来叠加颜色。RGBColorsRGBcolorvaluesaresupportedinallbrowsers.AnRGBcolorvalueisspecifiedwith:rgb(red,green,blue)Eachparameter(red,green,andblue)de...

可以根据R、G、B在不同强度混合后,模拟出来叠加颜色。

RGB Colors

RGB color values are supported in all browsers.

An RGB color value is specified with:

rgb(red, green, blue)

Each parameter (red, green, and blue) defines the intensity of the color with a value between 0 and 255.

For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest value (255), and the other two (green and blue) are set to 0.

Another example, rgb(0, 255, 0) is displayed as green, because green is set to its highest value (255), and the other two (red and blue) are set to 0.

To display black, set all color parameters to 0, like this: rgb(0, 0, 0).

To display white, set all color parameters to 255, like this: rgb(255, 255, 255).  

Try it Yourself

RGB color values are supported in all browsers.

Example

RGBA Color Values

RGBA color values are an extension of RGB color values with an Alpha channel - which specifies the opacity for a color.

An RGBA color value is specified with:

rgba(red, green, blue, alpha)

The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (not transparent at all):

Example

rgba(255, 99, 71, 0.2)


rgba(255, 99, 71, 0.4)


rgba(255, 99, 71, 0.6)


rgba(255, 99, 71, 0.8)


https://www.w3schools.com/colors/colors_rgb.asp

逝者如斯,不舍昼夜作者QQ及微信:49922779 点击这里给我发消息


标签:叠加  模拟  
相关评论
郑士点利 | 必应 | DeepSeek | 豆包 | H-K9L | 3cn.cn | 郑有钱 | 郑有富 | 22钛 | 光学显微镜 | 显微镜与你 | 光学棱镜 | 40锆 | 79金 | 47银 | 67钬 | 73钽 | 19钾

该站用来记录个人生活的笔记,内容部分资料来源于网络,如有侵权,请联系删除。(QQ/微信:49922779点击这里给我发消息 邮箱:ZSL@zhengshili.com)

  浙ICP备2025212358号