gjacked Posted January 11, 2016 Share Posted January 11, 2016 I'm looking at a piece of code that uses: blockquote cite, blockquote small { color: #333; font-size: 15px; font-size: 1.5rem; font-family: "Noto Sans", sans-serif; line-height: 1.6; } input:focus, textarea:focus { background-color: #fff; border: 1px solid #c1c1c1; border: 1px solid rgba(51, 51, 51, 0.3); color: #333; } Is there something on the W3Schools tutorial that defines how the three character hex color codes are set? I've found these three uses in the tutorial but no description on how they are set. #section1 {padding-top:50px;height:500px;color: #fff; background-color: #1E88E5;} <style> .w3-theme { color:#fff !important;background-color:#3f51b5 !important} .w3-theme-light { color:#000 !important;background-color:#e8eaf6 !important} /*Generated CSS:*/ .w3-theme-d4 {color:#fff; background-color:#3b3b11} .w3-theme-d3 {color:#fff; background-color:#5f5f1b} .w3-theme-d2 {color:#fff; background-color:#838325} .w3-theme-d1 {color:#fff; background-color : #a7a730} .w3-theme {color:#000; background-color:#c7c73d} .w3-theme-l1 {color:#000; background-color:#d2d260} .w3-theme-l2 {color:#000; background-color:#dcdc84} .w3-theme-l3 {color:#000; background-color : #e6e6a8} .w3-theme-l4 {color:#000; background-color : #f0f0cb} .w3-theme-l5 {color:#000; background-color : #fcfcf3} Any pointers are appreciated, thanks. Link to comment Share on other sites More sharing options...
davej Posted January 11, 2016 Share Posted January 11, 2016 It's simply hexadecimal RGB and can be in the format 0 to F or 00 to FF for each color. http://www.w3schools.com/cssref/css_colors_legal.asp Link to comment Share on other sites More sharing options...
dsonesuk Posted January 11, 2016 Share Posted January 11, 2016 They are short coded hex colours for example, if each group of two characters of ffffff , ff ff ff are the same, you can use shorten code fff to produce same colour. ffffff = fff ff0000 = f00 ff00ff = f0f and so on... Link to comment Share on other sites More sharing options...
gjacked Posted January 12, 2016 Author Share Posted January 12, 2016 This points to a color range of f * f * f = 4096 colors with no documentation. Link to comment Share on other sites More sharing options...
davej Posted January 12, 2016 Share Posted January 12, 2016 Documentation of what? There are color pickers available, such as... http://www.w3schools.com/tags/ref_colorpicker.asp Link to comment Share on other sites More sharing options...
COBOLdinosaur Posted January 12, 2016 Share Posted January 12, 2016 I'm not sure what you think you need for documentation. Most of the values are not named colors. The standard color pickers list the named values. In the full rgb range there are over 16 million colors, and I guarantee you that no one is going to try and give them all names. The important thing with the numbers is not so much the colors they produce, but the calculations to determine contrast between foreground and back ground. After you look at the color pickers on w3schools and other sources you might find the approach to producing good contrast in this article written by a colorblind web developer I'm not sure if what you are looking for is guidelines for usage but maybe that will help. Link to comment Share on other sites More sharing options...
gjacked Posted January 13, 2016 Author Share Posted January 13, 2016 Thanks COBOLdinosaur, interesting and useful article but not quite what I was looking for. Davej, the colorpicker helped me. The colorvalue entry field accepted 3 character hex colors. They actually do translate from n to nn. W3Schools doesn't say that anyplace that I could find. 1h 2h dec 0 00 0 1 11 17 2 22 34 3 33 51 4 44 68 5 55 85 . . . e ee 238 f ff 255 So, each 1h step is separated by seventeen 2h steps, and it all fits perfectly! I'm slow, sorry. Yes, Davej and Dsonesuk you did say that but it just didn't fit in my thinking. Thanks all for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now