{"id":1201,"date":"2024-07-31T12:05:07","date_gmt":"2024-07-31T10:05:07","guid":{"rendered":"https:\/\/blog.sutilweb.eu\/?page_id=1201"},"modified":"2024-07-31T12:05:08","modified_gmt":"2024-07-31T10:05:08","slug":"06-colores-css","status":"publish","type":"page","link":"https:\/\/sutilweb.eu\/index.php\/lenguajes\/css3\/css3-basico\/06-colores-css\/","title":{"rendered":"06. Colores CSS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Los <strong>colores<\/strong> se especifican utilizando nombres de color predefinidos o valores <strong>RGB<\/strong>, <strong>HEX<\/strong>, <strong>HSL<\/strong>, <strong>RGBA<\/strong>, <strong>HSLA<\/strong>.<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"215\" src=\"https:\/\/blog.sutilweb.eu\/wp-content\/uploads\/2024\/07\/Colores-CSS3.png\" alt=\"\" class=\"wp-image-1203\" srcset=\"https:\/\/sutilweb.eu\/wp-content\/uploads\/2024\/07\/Colores-CSS3.png 794w, https:\/\/sutilweb.eu\/wp-content\/uploads\/2024\/07\/Colores-CSS3-300x81.png 300w, https:\/\/sutilweb.eu\/wp-content\/uploads\/2024\/07\/Colores-CSS3-768x208.png 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Color de fondo<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Puedes establecer el color de fondo para los elementos HTML.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;h1&nbsp;style=\"background-color:DodgerBlue;\"&gt;Hello World&lt;\/h1&gt;\n&lt;p&nbsp;style=\"background-color:Tomato;\"&gt;Lorem ipsum...&lt;\/p&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Color del texto<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Puedes cambiar el color del texto, veamos un ejm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;h1&nbsp;style=\"color:Tomato;\"&gt;Hello World&lt;\/h1&gt;\n&lt;p&nbsp;style=\"color:DodgerBlue;\"&gt;Lorem ipsum...&lt;\/p&gt;\n&lt;p&nbsp;style=\"color:MediumSeaGreen;\"&gt;Ut wisi enim...&lt;\/p&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Color de los bordes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Puedes cambiar el color de los bordes con CSS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;h1&nbsp;style=\"border:2px solid Tomato;\"&gt;Hello World&lt;\/h1&gt;\n&lt;h1&nbsp;style=\"border:2px solid DodgerBlue;\"&gt;Hello World&lt;\/h1&gt;\n&lt;h1&nbsp;style=\"border:2px solid Violet;\"&gt;Hello World&lt;\/h1&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Valores de color CSS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">En <strong>CSS<\/strong>, los colores tambi\u00e9n se pueden especificar usando valores <strong>RGB<\/strong>, valores <strong>HEX<\/strong>, valores <strong>HSL<\/strong>, valores <strong>RGBA<\/strong> y valores <strong>HSLA.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Igual que el nombre del color \u00abTomato\u00bb.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;h1&nbsp;style=\"background-color:rgb(255, 99, 71);\"&gt;...&lt;\/h1&gt;\n&lt;h1&nbsp;style=\"background-color:#ff6347;\"&gt;...&lt;\/h1&gt;\n&lt;h1&nbsp;style=\"background-color:hsl(9, 100%, 64%);\"&gt;...&lt;\/h1&gt;\n\n&lt;h1&nbsp;style=\"background-color:rgba(255, 99, 71, 0.5);\"&gt;...&lt;\/h1&gt;\n&lt;h1&nbsp;style=\"background-color:hsla(9, 100%, 64%, 0.5);\"&gt;...&lt;\/h1&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Los colores se especifican utilizando nombres de color predefinidos o valores RGB, HEX, HSL, RGBA, HSLA.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":563,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-1201","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Sutil Web","author_link":"https:\/\/sutilweb.eu\/index.php\/author\/sutilweb\/"},"uagb_comment_info":0,"uagb_excerpt":"Los colores se especifican utilizando nombres de color predefinidos o valores RGB, HEX, HSL, RGBA, HSLA.","_links":{"self":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/1201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/comments?post=1201"}],"version-history":[{"count":2,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/1201\/revisions"}],"predecessor-version":[{"id":1204,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/1201\/revisions\/1204"}],"up":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/563"}],"wp:attachment":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/media?parent=1201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}