<div class="element">
  color() function in CSS
</div>
@use postcss-color-function;
@use postcss-preset-env;
@import url("https://fonts.googleapis.com/css?family=Gochi+Hand");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background-color: #291642;
  font-family: "Gochi Hand", sans-serif;
  color: #fff;
  font-size: 130%;
  letter-spacing: 0.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100vw;
  min-height: 100vh;
  padding: 10px;
}

.element {
  width: 50vw;
  min-height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4vh;
  font-size: 2rem;
  
  color: color(#f36 whiteness(100%)); /* ❯❯❯ rgb(255, 255, 255) */
  border: 2vh solid color(#f36 hue(196)); /* ❯❯❯ rgb(51, 201, 255)*/
  box-shadow: 0px 0px 5px 6px color(#f36 saturation(15%) lightness(54%) green(209) blue(250) whiteness(0%)); /* ❯❯❯ rgb(0, 142, 250) */
  background-color: color(#f36 saturation(63%) red(61)); /* ❯❯❯ rgb(61, 89, 121) */
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.