
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Define colors using the Red-Green-Blue model (RGB) with CSS
Use the CSS rgb() function to define color using the RGB Model. You can try to run the following code to set the color with Reg-Green-Blue (RGB) model
Example
<!DOCTYPE html> <html> <head> <style> h1 { background-color:hsl(0,100%,50%); } h2 { background-color:hsl(192,89%,48%); } p { background-color:rgb(0,0,255); color: rgb(255,255,255); } </style> </head> <body> <h1>Red Background</h1> <h2>Blue Background</h2> <p>This is demo text!</p> </body> </html>
- Related Questions & Answers
- Define colors using the Red-Green-Blue-Alpha model (RGBA) with CSS
- Define colors using the Hue-Saturation-Lightness model (HSL) with CSS
- Define colors using the Hue-Saturation-Lightness-Alpha model (HSLA) with CSS
- How to convert a colored image to blue/green/red image using Java OpenCV library?
- Define the CSS Box Model
- List with a blue left border using CSS
- How to create a plot using rgb colors in R?
- CSS rgb() Function
- How to create blue or red colored boxplots in R using ggplot2?
- Create red neon glow shadow using CSS
- Usage of rgb() CSS function
- C Program to Change RGB color model to HSV color model
- Define skew transforms along with x axis using CSS
- Define skew transforms along with y axis using CSS
- Display a blue shadow on image hover with CSS
Advertisements