change grade distribution colors to match updated figma
This commit is contained in:
@@ -16,6 +16,20 @@ export const colors = {
|
|||||||
red: '#af2e2d',
|
red: '#af2e2d',
|
||||||
black: '#1a2024',
|
black: '#1a2024',
|
||||||
},
|
},
|
||||||
|
gradeDistribution: {
|
||||||
|
a: '#22c55e',
|
||||||
|
aminus: '#a3e635',
|
||||||
|
bplus: '#84CC16',
|
||||||
|
b: '#FDE047',
|
||||||
|
bminus: '#FACC15',
|
||||||
|
cplus: '#F59E0B',
|
||||||
|
c: '#FB923C',
|
||||||
|
cminus: '#F97316',
|
||||||
|
dplus: '#EA580C', // TODO (achadaga): copilot generated, get actual color from Isaiah
|
||||||
|
d: '#DC2626',
|
||||||
|
dminus: '#B91C1C',
|
||||||
|
f: '#B91C1C',
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
type NestedKeys<T> = {
|
type NestedKeys<T> = {
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import HighchartsReact from 'highcharts-react-official';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Course } from 'src/shared/types/Course';
|
import { Course } from 'src/shared/types/Course';
|
||||||
import { Distribution, LetterGrade } from 'src/shared/types/Distribution';
|
import { Distribution, LetterGrade } from 'src/shared/types/Distribution';
|
||||||
|
import { colors } from 'src/shared/util/themeColors';
|
||||||
import {
|
import {
|
||||||
NoDataError,
|
NoDataError,
|
||||||
queryAggregateDistribution,
|
queryAggregateDistribution,
|
||||||
querySemesterDistribution,
|
querySemesterDistribution,
|
||||||
} from 'src/views/lib/database/queryDistribution';
|
} from 'src/views/lib/database/queryDistribution';
|
||||||
import colors from 'src/views/styles/colors.module.scss';
|
|
||||||
|
|
||||||
interface GradeDistributionProps {
|
interface GradeDistributionProps {
|
||||||
course: Course;
|
course: Course;
|
||||||
@@ -23,20 +23,19 @@ enum DataStatus {
|
|||||||
ERROR = 'ERROR',
|
ERROR = 'ERROR',
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Use tailwind colors here
|
|
||||||
const GRADE_COLORS: Record<LetterGrade, string> = {
|
const GRADE_COLORS: Record<LetterGrade, string> = {
|
||||||
A: colors.turtle_pond,
|
A: colors.gradeDistribution.a,
|
||||||
'A-': colors.turtle_pond,
|
'A-': colors.gradeDistribution.aminus,
|
||||||
'B+': colors.cactus,
|
'B+': colors.gradeDistribution.bplus,
|
||||||
B: colors.cactus,
|
B: colors.gradeDistribution.b,
|
||||||
'B-': colors.cactus,
|
'B-': colors.gradeDistribution.bminus,
|
||||||
'C+': colors.sunshine,
|
'C+': colors.gradeDistribution.cplus,
|
||||||
C: colors.sunshine,
|
C: colors.gradeDistribution.c,
|
||||||
'C-': colors.sunshine,
|
'C-': colors.gradeDistribution.cminus,
|
||||||
'D+': colors.tangerine,
|
'D+': colors.gradeDistribution.dplus,
|
||||||
D: colors.tangerine,
|
D: colors.gradeDistribution.d,
|
||||||
'D-': colors.tangerine,
|
'D-': colors.gradeDistribution.dminus,
|
||||||
F: colors.speedway_brick,
|
F: colors.gradeDistribution.f,
|
||||||
};
|
};
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
|
|||||||
Reference in New Issue
Block a user