Home Reference Source

src/sdgs/getColor.js

  1. import { getSdg } from "./getSdg";
  2.  
  3. /**
  4. * Get the color for an SDG with the given number.
  5. * @param {number} sdgNumber - The number of the SDG (1 - 17)
  6. * @return {String} Return goal color (HEX code)
  7. */
  8. export const getColor = (sdgNumber) => {
  9. return getSdg(sdgNumber).color;
  10. };