This message was deleted.
# help
s
This message was deleted.
a
Hello! Does something like this do the trick? https://observablehq.com/@observablehq/california-dams#cell-81 I think for yours that might look like:
Copy code
color: {
    legend: true,
    domain: ["Sub 1", "Sub 2", "Sub 3"],
    range: ["blue", "gray", "green"]
  }
👍 1
t
@Allison (Observable Team) thanks a lot, that's exactly what I want
🎉 1
m
Allison’s answer provides a technique to specify exactly any color scheme you want. You might also try one of the prebuilt schemes, though. The advantage is that folks have devoted some time and thought as to what colors go well together. For example:
Plot.barY(dataset, { y: "value", x: "group", fill: "sub" }).plot({
color: { legend: true, scheme: 'Accent' }
})
Color scales are detailed here: https://observablehq.com/plot/features/scales#color-scale-options
🙌 1