From 6b581d6f817a66138f5181a5f1d39c9119ea6e5c Mon Sep 17 00:00:00 2001 From: Agnes Brettl <42897234+brettl1991@users.noreply.github.com> Date: Sat, 2 Mar 2019 17:00:44 +0000 Subject: [PATCH] Rgbcolors with alpha channel (#27219) --- guide/english/css/background/index.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/guide/english/css/background/index.md b/guide/english/css/background/index.md index b03bb7237c..d85efea16a 100644 --- a/guide/english/css/background/index.md +++ b/guide/english/css/background/index.md @@ -28,11 +28,14 @@ h1 { ``` ![twobackground](https://user-images.githubusercontent.com/26467304/31036152-0607936a-a539-11e7-9e9f-a5e60ade042d.png) -In CSS color can be defined in four ways: (using white as an example) -* A valid color name such as `white`. -* A HEX value such as `#FFFFFF`. -* An abreviated HEX value such as '#FFF'. -* An RGB value such as `rgb(255,255,255)`. +In CSS color can be defined in a few different ways: +* A valid color name such as `blue` +* A HEX value such as `#FFFFF` (This is the hex value for white.) +* An abbreviated HEX value such as '#FFF'. +* An RGB value such as `rgb(76,175,80)` (This is the RGB value for light green.) +* RGBA color values are an extension of RGB color values with an alpha channel - which specifies the opacity of the object. + * An RGBA color is specified with the rgba() function, which has the following syntax: `rgba(red, green, blue, alpha)` + * The alpha parameter is a number between `0.0` (fully transparent) and `1.0` (fully opaque). ### Background Images You can use the `background-image` property to set an image as a background for an element.