Richardsl / heatmap-calendar-obsidian

An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Apache License 2.0
645 stars 103 forks source link

FEATURE REQUEST: ability to change color of background cells OR support dark mode #6

Closed asphaltbuffet closed 2 years ago

asphaltbuffet commented 2 years ago

Able to set a value (optional) in code block that specifies a color for cells that have no value:

const calendarData = { 
    year: 2022 , 
        background: "#FFFFFF", //optional, defaults to "#000000"
    colors: {   // optional, defaults to first value
      blue:        ["#b8d4ff","#6da6ff","#2c7dff","#0059e7","#003ea1"], // this first entry is considered default
      green:       ["#c6e48b","#7bc96f","#49af5d","#2e8840","#196127"],
      red:         ["#ff9e82","#ff7b55","#ff4d1a","#e73400","#bd2a00"],
      orange:      ["#ffa244","#fd7f00","#dd6f00","#bf6000","#9b4e00"],
      pink:        ["#ff96cb","#ff70b8","#ff3a9d","#ee0077","#c30062"],
      orangeToRed: ["#ffdf04","#ffbe04","#ff9a03","#ff6d02","#ff2c01"],
    },
    entries: [] // populated in the DataviewJS loop below
}