Most color settings of a Grid or Masonry view list colors from your theme, such as Accent or Red. Two more options let you use any color:
- Custom — use one color of your choice for every card in the view.
- Property — give each card the color stored in a property of its note.
When you select either option, a field appears below the setting.
Color settings
Each part of the card has its own color setting in the View settings:
| Part | Setting |
|---|---|
| Title | Title → Color |
| Subtitle | Subtitle → Color |
| Text preview | Text preview → Color |
| Icon | Icon → Color |
| Property names | Properties → Property name color |
| Property values | Properties → Property value color |
| Card background | Card → Background color |
| Border | Card → Border color |
| Shadow | Card → Shadow color |
To color the area behind the cards, refer to View appearance > Set a background color.
Border color and Shadow color appear only when cards have a border or a shadow. See Card appearance.
While Obsidian uses a light color scheme, a title, icon, subtitle, text preview, property name, or property value color set to a color from your theme, such as Accent or Red, shows that color's dark color scheme shade on a poster or backdrop with Tint set to Dark. While Obsidian uses a dark color scheme, it shows the light color scheme shade on a poster or backdrop with Tint set to Light.
Use a custom color
- In the View settings, set a color setting to Custom. For example, set Border color to Custom.
- In the field that appears below it, enter a color. For example, enter
#ffc0cbin Custom border color.
The field accepts any value CSS accepts as a color:
- A hex code, such as
#ffc0cb - An
rgb()orhsl()value, such asrgb(255 192 203) - A color name, such as
pink - A color variable from your theme, such as
var(--color-pink)
If the field is empty or isn't a valid color, the setting uses its default.
Color each card from a property
- In your notes, add a property that holds a color, for example a
colorproperty with the valuelightblue. - In the View settings, set a color setting to Property. For example, set Background color to Property.
- In the field that appears below it, select the property. For example, select
colorin Background color property.
Each card then takes the color from its own note. The value can be anything the custom color field accepts.
- The field lists text and list properties, and formulas.
- If the property is a list, only its first value is used.
- The property doesn't need to be selected in the Properties menu.
If a card's note doesn't have the property, or its value is empty or isn't a color, the card shows the color that setting has in the default settings for the view's layout. If the default settings don't set it, or set it to Property, the card shows the setting's built-in default.
To choose a color from another property, use a formula. For example, this formula colors notes with a high priority pink, and all other notes blue:
if(priority == "High", "pink", "powderblue")
To use the note colors you set in Notebook Navigator, refer to Notebook Navigator.