diff --git a/www/src/pages/foundations/colors.tsx b/www/src/pages/foundations/colors.tsx index a091a05612..ed9254ad74 100644 --- a/www/src/pages/foundations/colors.tsx +++ b/www/src/pages/foundations/colors.tsx @@ -2,10 +2,8 @@ import React from 'react'; import { graphql } from 'gatsby'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import Color from 'color'; import { Container, DataTable } from '~paragon-react'; import SEO from '../../components/SEO'; -import MeasuredItem from '../../components/MeasuredItem'; import Layout from '../../components/PageLayout'; import { CodeCell } from '../../components/TableCells'; @@ -57,30 +55,26 @@ export interface ISwatch { isUnused?: boolean, } +const styles = getComputedStyle(document.body); + function Swatch({ name, colorClassName, isUnused }: ISwatch) { + const computedValue = styles.getPropertyValue(name); + return (
- {name}
-
- {measurements['background-color'] && (
-
- {Color(measurements['background-color']).hex()}
-
- )}
-
+ {`var(${name})`}
+
+
+ {computedValue}
+
+