Talking about Color and Grids
When we think about web design we normally think in pixels or even in percentages but if we really want to take advantage of users screens we need to know there aspect ratio of their screens. Is the users screen a widescreen or a traditional one? What type of design considerations can we take with this information in hand. In this lecture, we will learn about designing for aspect ratios %u2013 this becomes really important in video projects.
Keynotes:
- Why should we care about the aspect ratio of the users screen?
- Finding out the devices aspect ration
- TV rules (scan).
Properties:
adoptive design, aspect-ratio, device-aspect-ratio, tv scan, progressive, interlaceVideo Transcript
00:00Welcome to the last lecture in this section. What we're going to talk about in this lecture
00:05is about colors and grids and really we're talking about the leftovers that we didn't talk about.
00:11I don't use them really and we're going to talk about why in this lecture that's going to be a
00:16bit theoretical, but really you need to know about it because if you know about it and you
00:21encounter a scenario where you need it, it could be a lifesaver. So let's jump right into it.
00:26So we're going to talk about designing based on the color configuration of devices and we're
00:30also going to talk about devices that are grid based or in other words that their fonts are
00:36are fixed or they're bitmap based. So let's get started. I want to start talking about the color
00:43property, the CSS media query property that enables you to basically say hey any device
00:49that is colorful beyond that you could also define a range of that colors and when we're
00:55talking about this range it's really something it's called bits. So how many bits of color is
01:00there per color and we're talking about most modern devices have normally eight bits per color.
01:07So I haven't really seen a variant that it doesn't have eight bits, but if you're working
01:13in a specific reality where you're trying to create customization based on the amount of
01:17bits of color and that device is really returning different values, then you could customize your
01:22colors based on that response that you get back for those devices that get less colors than eight
01:28bits. Now the next item is color index. Now the color index again is a CSS media query property.
01:37It enables us to auto set a minimum max value just like with the color. It enables us to set
01:43ranges. In this line we're basically saying any device that has at least 256 colors registered
01:49in its index and we're saying that most not all devices but some devices have a color lookup table.
01:56So they have a subset of colors and then they go to that table and convert the colors through
02:01that table. In this case we're asking for a device that has at least 256 colors in that
02:07lookup table. Unfortunately most devices that I've seen or really all devices I've seen so far
02:14always return zero for this value which kind of turns us to be irrelevant. Maybe in the future or
02:20with the specific device that you're targeting that's not the case. It's definitely worth checking
02:25into if you need to do designs that are based on color and customizations to devices that have
02:30a lower amount of colors than your average device. The next item I want to talk about
02:36is monochrom which enables us to design for devices that are not colorful really. For
02:42example like the Amazon Kindle or versions of the Amazon Kindle which are not colorful,
02:48they're gray and they're scales of gray. So we could set them just like with every other media
02:53query. They accept a range as well so there's ranges of values of how much grays and how much
02:59colors it could accept. And again unfortunately it does has a range as we're saying but unfortunately
03:04I never met a device that returned a value besides zero. You might have. I would love to hear about
03:10that so I'll know about it but so far at this stage right now I have not met a device like that.
03:16All right that's leading us to the last topic which is grids. As we're saying grids happen
03:22again the media query very similar. The grid based design though is just one rule. There's no
03:29there's no extra information that you provide into the grid. The device is a grid or it's not a grid
03:34device. Grid devices are devices that have fixed fonts where the fonts cannot have various different
03:40sizes so they're basically configured and sorted in advance where there's a set size for them.
03:46There's set font there's not a variant of different fonts or they're devices that render
03:52as a bitmap. Now these are very uncommon and again it's not something that I've met personally
03:58but when you get and I've researched this very heavily but I couldn't find really good
04:02documentation about devices that really work in this way that support the grid in CSS3. I would
04:09love to hear about them but that really wraps up our conversation really about knowing everything
04:15that there is to know about responsive design and media queries. We're really done with the
04:19foundations because in the next section we're done talking about what is responsive and how
04:24to create responsive design as we move into seeing is it worth for us to work with third-party
04:29libraries. What are the advantages and what are the disadvantages. So we'll see you in the next
04:34chapter in the next section where we dive away from the pure CSS that we've been so far and
04:41spread our wings and fly into places where other developers contributed libraries to help us create
04:47responsive designs.
