02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Exploring the core color properties

There are many properties in CSS that control the color of things. We talk about all of them throughout our CSS courses. As such, we just wanted to showcase one of them. The core one 'color'. There are many ways to describe what a color is. The most basic way is using a name. In the following lectures we will get to know how color systems work and more importantly how to work with them.

Keynotes:

  • The basic colors
  • Web safe colors
  • All the colors by name

Properties: color, opacity, basic color values, background, black, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua, css colors

Video Transcript

00:00(techno music)
00:05Welcome to a brand new title,
00:07and we're talking about colors
00:09as you might have guessed from the
00:12kind of tagline of the course.
00:13What are we gonna talk about in this course?
00:16We're gonna talk about the base,
00:18well, we're gonna talk about a lot of stuff,
00:19but in this lecture,
00:20we're gonna talk about the base colors,
00:22the base named colors.
00:24We're gonna then cross over into the
00:25web safe colors, and we're gonna end
00:27off our conversation with all the named colors.
00:30By the end of this lecture,
00:32you're gonna know everything you need to know
00:33about named colors.
00:36So let's get started.
00:38Welcome, welcome, welcome, welcome.
00:42All right, let's get started.
00:43This is really exciting.
00:44We're talking about colors.
00:45Let's jump right into it and see it in action first.
00:48I'm assuming you already know what colors are
00:50and worked a little bit with them
00:51because, or you've been doing a little bit of CSS,
00:54and HTML, or maybe you've took our CSS course,
00:58which you'll find in your resources
01:00on zero to skills.
01:01Just make sure you search for absolute CSS,
01:05and I'll make sure to add it into the references
01:07of the course as well.
01:09So let's get started with just seeing in action
01:11just the creation of a color.
01:13I'm gonna assume most of you know
01:15how to work with source files.
01:16Make sure you downloaded them.
01:18We have an index file.
01:19We have a style file.
01:21We have a JavaScript file
01:22where we'll put some JavaScript code
01:24whenever we want to,
01:25but we're not gonna talk about it
01:26because this course is gonna
01:27be explicitly CSS.
01:29But we'll add a little bit of jazz
01:30into our application whenever needed
01:32inside of our JavaScript section.
01:35So let's go into our CSS.
01:36I'm just gonna find one color,
01:38and I'm gonna go ahead to here
01:39for my background color or foreground color.
01:42We have your background.
01:43I have here my color.
01:44I'm just gonna go ahead and delete this color
01:46and just go ahead and literally
01:47just write here black for my background.
01:50I'm gonna go ahead and write white
01:52for my foreground.
01:53This is the easiest way to define colors,
01:55and there's tens of different properties in CSS
01:58that enable us to control different colors
02:01if it's a border,
02:02if it's a various amounts of stuff.
02:04So the most simplistic way is by defining them
02:07with a definitive naming convention.
02:10Once we've put that name,
02:12right ahead our color would change
02:14to that specific color combination.
02:17Now you might ask yourself
02:18so how does this actually work,
02:20and what names are legal,
02:22what names are not?
02:22I'm just gonna go ahead and undo that change
02:24and make our app site a little bit cleaner.
02:27Go ahead into this first, really, lecture.
02:31We're gonna skip the colors start
02:33because that's a textural element.
02:35Just make sure to read it.
02:36We're gonna jump right into our
02:38Exploring The Core Color Properties.
02:42Now make sure again that you'll read number one,
02:44and at number two here,
02:45notice that we have your link here.
02:47Go ahead and click into that link.
02:49It will open you up in a new browser
02:50into our blog where you'll see
02:53I'm just gonna close this marketing message
02:55there of ours, where we have here
02:57a conversation about colors.
02:58I'm not gonna go in depth, too in depth,
03:00into the theory behind colors.
03:02Make sure you read it,
03:03but basically the story in a nutshell
03:06is the early, early, early web
03:09basically transcribed a few color names.
03:11Those color names are only 16 colors
03:13that were considered web safe.
03:16The reason behind it was very simple.
03:18There was a lot of different devices.
03:19Many of them did not have
03:20a lot of different colors when the web was new.
03:23They wanted to make sure that if you were
03:25creating a color on your website,
03:27that it would actually look the same
03:29and render the way you would want it
03:30in all those different browsers.
03:32That was the birth of the basic colors,
03:35and you have the list of them right here.
03:37More in depth please do read about it
03:39in the documentation in this file here.
03:42Just read the bio.
03:43The more common convection is a hex value
03:48that represents colors.
03:49We're gonna talk about that in the next lecture.
03:51But for now, let's focus on the color names.
03:54So these are the basic color names.
03:55There weren't that many color combinations.
03:58Each iteration of CSS from CSS one,
04:01to CSS two, to CSS three now,
04:03there is a lot more colors added.
04:05And at this stage, there's 256 colors that are named,
04:09and I've actually listed out all the names
04:11in this document.
04:12So if you want to have a reference,
04:13just keep this around and you could scroll
04:16through and find all the different names.
04:18You could literally go ahead
04:19and if I want to set it to be slate blue,
04:21for example, I could go ahead here
04:23and just set my background color
04:25to be slate blue.
04:27If I go ahead and save it,
04:28go back into my browser,
04:30click on refresh,
04:31you'll see that now my background
04:32will be that really beautiful color
04:35that is not working for our design.
04:37So I'll go ahead and undo it.
04:40So that's really color in a nutshell
04:41and the first and most simple way
04:44to work with colors.
04:46In the following lecture,
04:47we're gonna go ahead and start looking
04:49at colors that are not named,
04:50colors that we're creating ourselves,
04:52and we're gonna see and understand
04:53how RGB works,
04:55what is RGB,
04:56and if we have enough time,
04:57we're also gonna talk about alpha channels.
05:00So let's jump right into it.
05:01See you in the next lecture
05:02where we'll really start understanding
05:04how colors are constructed
05:05on a browser.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!