HSLa<\/a> is a little easier to work with than RGBa if you need to be adjusting colors manually through code.<\/p>\n","protected":false},"excerpt":{"rendered":"This article was originally published on February 2, 2009 and is now being updated to clarify the concept and update the information for modern browsers. RGBa is a way to declare a color in CSS that includes alpha transparency support. It looks like this: div { background: rgba(200, 54, 54, 0.5); } This allows us […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4,20],"tags":[837,894],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":155091,"url":"https:\/\/css-tricks.com\/tinted-images-multiple-backgrounds\/","url_meta":{"origin":2151,"position":0},"title":"Tinted Images with Multiple Backgrounds","date":"November 4, 2013","format":false,"excerpt":"The background property in CSS can accept comma separated values. \"Multiple\" backgrounds, if you will. You can also think of them as layered backgrounds since they have a stacking order. If we layer a transparent color over an image, we can \"tint\" that image. But it's not quite as obvious\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5473,"url":"https:\/\/css-tricks.com\/transparency-in-web-design\/","url_meta":{"origin":2151,"position":1},"title":"Transparency in Web Design","date":"June 6, 2010","format":false,"excerpt":"How is it done? Let's take a gander at four different ways. Each of them handling the illusion in a different way, and each completely appropriate depending on the situation at hand. Totally Friggin Fake It From the Spectrum Theme website The end result of any web design is basically\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/csstricks-uploads\/shadowtranparency.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":194152,"url":"https:\/\/css-tricks.com\/fun-line-height\/","url_meta":{"origin":2151,"position":2},"title":"Fun with line-height!","date":"January 26, 2015","format":false,"excerpt":"The line-height property in CSS controls the space between lines of text. It is often set in a unitless value (e.g. line-height: 1.4;) so that it is proportional to the font-size. It's a vital property for typographic control. Too low and lines are awkwardly squished together; too high and lines\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":336563,"url":"https:\/\/css-tricks.com\/image-fragmentation-effect-with-css-masks-and-custom-properties\/","url_meta":{"origin":2151,"position":3},"title":"Image Fragmentation Effect With CSS Masks and Custom Properties","date":"March 23, 2021","format":false,"excerpt":"Geoff shared this idea of a checkerboard where the tiles disappear one-by-one to reveal an image. In it, an element has a background image, then a CSS Grid layout holds the \u201ctiles\u201d that go from a filled background color to transparent, revealing the image. A light touch of SCSS staggers\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/03\/image-fragmentation-jellyfish-1.gif?fit=1000%2C500&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6565,"url":"https:\/\/css-tricks.com\/yay-for-hsla\/","url_meta":{"origin":2151,"position":4},"title":"Yay for\u00a0HSLa","date":"June 15, 2010","format":false,"excerpt":"Huge sogging longbottoms? High strength low alloy steel? NOPE, we're talking Hue, Saturation, Lightness, and alpha, and it's a way of declaring color in CSS. It looks like this: #some-element { background-color: hsla(170, 50%, 45%, 1); } It is similar to RGBa in that you declare three values determining the\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/05\/hsl.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":307863,"url":"https:\/\/css-tricks.com\/no-comma-color-functions-in-css\/","url_meta":{"origin":2151,"position":5},"title":"No-Comma Color Functions in CSS","date":"May 4, 2020","format":false,"excerpt":"There have been a couple of viral tweets about this lately, one from Adam Argyle and one from Mathias Bynes. This is a nice change that makes CSS a bit more clear. Before, every single color function actually needs two functions, one for transparency and one without, this eliminates that\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2016\/09\/nerd-color.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/2151"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=2151"}],"version-history":[{"count":34,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/2151\/revisions"}],"predecessor-version":[{"id":277075,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/2151\/revisions\/277075"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=2151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=2151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=2151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}