@mixin generateVarAndRgb($name, $hex) {
    #{$name}: $hex;
    #{$name}--rgb: red($hex), green($hex), blue($hex);
}

$brand_contrast:    #FFFFFF;

$brand_l4:      #77D2FF;
$brand_l3:      #5ECBFF;
$brand_l2:      #43C2FF;
$brand_l1:      #39B2EF;
$brand_core:    #2FA2DB;
$brand_d1:      #2592C3;
$brand_d2:      #1B82AD;
$brand_d3:      #117297;
$brand_d4:      #076281;
$brand_d5:      #045773;
$brand_d6:      #054A61;
$brand_d7:      #043E51;

$brand_core_d10: transparentize($brand_core, 0.1);
$brand_core_d15: transparentize($brand_core, 0.15);
$brand_core_t90: transparentize($brand_core, 0.9);
$brand_l2_l20: lighten($brand_l2, 20%);
$brand_l2_t40: transparentize($brand_l2, 0.4);
$brand_l2_d10: darken($brand_l2, 0.1);
$brand_l2_d15: darken($brand_l2, 0.15);


:root {
    --brand-contrast: #{$brand_contrast};
    @include generateVarAndRgb(--brand-l4, $brand_l4);
    @include generateVarAndRgb(--brand-l3, $brand_l3);
    @include generateVarAndRgb(--brand-l2, $brand_l2);
    @include generateVarAndRgb(--brand-l1, $brand_l1);
    @include generateVarAndRgb(--brand-core, $brand_core);
    @include generateVarAndRgb(--brand-d1, $brand_d1);
    @include generateVarAndRgb(--brand-d2, $brand_d2);
    @include generateVarAndRgb(--brand-d3, $brand_d3);
    @include generateVarAndRgb(--brand-d4, $brand_d4);
    @include generateVarAndRgb(--brand-d5, $brand_d5);
    @include generateVarAndRgb(--brand-d6, $brand_d6);
    @include generateVarAndRgb(--brand-d7, $brand_d7);

    --brand-core-d10: #{$brand_core_d10};
    --brand-core-d15: #{$brand_core_d15};
    --brand-core-t90: #{$brand_core_t90};
    --brand-l2-l20: #{$brand_l2_l20};
    --brand-l2-t40: #{$brand_l2_t40};
    --brand-info-d10: #{$brand_l2_d10};
    --brand-info-d15: #{$brand_l2_d15};
}
