diff --git a/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.module.css b/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.module.css index 2821287a33..56f6851104 100644 --- a/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.module.css +++ b/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.module.css @@ -26,3 +26,26 @@ .dark { background-color: #131c27; } + +.contrastCircle { + height: 12px; + width: 12px; + background-color: white; + border: 1px solid rgb(184, 184, 184); + border-radius: 50%; +} + +.contrastCircleBlack { + background-color: black; +} + +.contrastBox { + display: flex; + align-items: center; + gap: 2px; + margin-top: 4px; +} + +.dark .contrastBox { + color: white; +} diff --git a/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.tsx b/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.tsx index 8ef1e3a5ba..2a430933b1 100644 --- a/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.tsx +++ b/apps/theme/app/testside/BaseContrastOverview/BaseContrastOverview.tsx @@ -4,7 +4,10 @@ import { useEffect, useState } from 'react'; import { CheckmarkIcon } from '@navikt/aksel-icons'; import cl from 'clsx/lite'; -import { getContrastFromLightness } from '../../../utils/colorUtils'; +import { + getContrastFromLightness, + getContrastFromHex, +} from '../../../utils/colorUtils'; import { calculateContrastOneColor } from '../../../utils/themeUtils'; import classes from './BaseContrastOverview.module.css'; @@ -83,17 +86,29 @@ export const BaseContrastOverview = () => { const Box = ({ color }: BoxProps) => { return ( -