// Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
// For licensing, see LICENSE.md.

@use 'sass:color';
@use 'sass:map';

$u-colors: (
	'primary': #3E59AD,
	'primary-dark': #314687,
	'link': #1b3af2,
	'accent': #FFF3DC,
	'background-hue-light': #FBFCFC,
	'background-hue': #F2F5F7,
	'background-dark': #f5f5f5,
	'background-bright': #fff,
	'background-gray': #474843,
	'text': #000000,
	'text-header': #000000,
	'text-invert': #ffffff,
	'text-invert-gray': #ffffffb2,
	'text-gray': #555555,
	'separator': #E9E9E9,
	'toggler': #BDBDBD,
	'highlight': #FFEB3B,
	'selected': #4FA800,
	'snippet-background': #272822,

	// Badges
	'badge-gray': #808080,
	'badge-orange': #E59E00,
	'badge-green': #8BC34A,
	'badge-red': #E50037,
	'badge-black': #212121,
	'badge-purple': #AB47BC,

	// Hints
	'hint-info': #64B5F6,
	'hint-hint': #AB47BC,
	'hint-warning': #FFE600,
	'hint-error': #FF1D00
);

@function u-color( $name, $offset: 0% ) {
	@return color.scale( map.get( $u-colors, $name ), $lightness: $offset );
}

@function u-border-color( $name, $offset: 0% ) {
	@return u-color( $name, $offset - 25% );
}
