@import "../settings/colours-palette";

////
/// @group helpers/colour
////

/// Get colour
///
/// @param {String} $colour - Name of colour from the colour palette
///   (`$ccs-colours`)
/// @return {Colour} Representation of named colour
///
/// @throw if `$colour` is not a colour from the colour palette
/// @access public

@function ccs-colour($colour) {
  $colour: quote($colour);

  @if not map-has-key($ccs-colours, $colour) {
    @error "Unknown colour `#{$colour}`";
  }

  @return map-get($ccs-colours, $colour);
}
