Logo Dataviz Color

Dataviz Color

Cộng đồng
skthewimp
dataviz-color

Chọn và gán màu cho một biểu đồ cụ thể dựa trên độ tương phản, khả năng phân biệt các chuỗi, khả năng nhận biết với người mù màu và khi chuyển sang thang xám, cũng như cách làm nổi bật màu chủ đạo trên nền xám. Ưu tiên thương hiệu; WCAG chỉ là mục tiêu tham khảo.

Tổng quan

Nhà phát hànhskthewimp
Kho mãkarthik-data-visualization-skill
Tên kỹ năngdataviz-color
Sao
49
Bản fork
5
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được skthewimp công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Dataviz Color trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/skthewimp/karthik-data-visualization-skill/tree/main/dataviz-color/claude
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/skthewimp/karthik-data-visualization-skill.git /tmp/karthik-data-visualization-skill
mkdir -p .claude/skills
cp -r /tmp/karthik-data-visualization-skill/dataviz-color/claude .claude/skills/dataviz-color
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Dataviz Color trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Dataviz Color ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Dataviz Color với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Dataviz Colour

Own the colour decision for one visualization: which colours to use and how to assign them to this chart's series or categories. This is a decision for the specific graph, not a palette look-up - even with a brand palette or recommended set in hand, a chart with N series and a given background still needs a call on which to use and how to assign them. Don't design the form, write annotations, or set number precision (those belong to karthik-data-visualization, chart-annotations, dataviz-precision).

The assignment arithmetic lives in the dataviz MCP as recommend_colours. Use it when the server is installed; without it, apply the same rules by hand (brand first, maximise separation between series while each reads on the background, then check contrast, colour-vision deficiency and grayscale by eye on the export). Keep the judgement here. Inside the construct pipeline, that judgement (available source, focal series, semantic meaning) is made at select as a compact colour_plan, resolved by recommend_colours, and applied at build - so this full skill is the standalone authority the plan distils, not a body loaded into the build call.

1. Where the available colours come from (precedence, higher wins)

  1. A brand or style skill, if installed. Scan the available-skills list for a name matching brand, style, design-system, theme, or palette; if one exists, invoke it and honour its palette and forbidden colours. The usual way a brand arrives.
  2. Colours or style guidance in the prompt/context - hex values, a named palette, "use our greens", a pasted style guide. Honour these too.
  3. Accessibility defaults when neither exists: colour-blind-safe starting palettes (Okabe-Ito, ColorBrewer, viridis).

Whatever wins defines the available set - the input to the decision, not the answer.

2. How many colours (max series per panel, not total categories)

Size the palette to the maximum number of series sharing a single panel that must be told apart by colour - a property of the form, not the total category count. N lines in one panel need N. Small multiples with k lines per panel need k (reused across panels), not the total across panels. Small multiples with one line per panel, direct labels, or position carrying identity need 0. Focal-plus-grey needs 1. Take that count as n_series (or use the count an upstream step handed you). When it's 0 there is no colour decision.

3. Always recommend for the specific graph

Call recommend_colours(available, colour_groups, background, focal, available_source=...). Pass where the set came from: brand and prompt colours (brand-skill, prompt) are spent first, exactly as given, and the tool only generates colours when there are more series than brand colours. A proposed set or hues read off a source image (source-extracted) are a prior: a colour that cannot be told apart from one already placed, or does not read on the background, is replaced by a generated one that can. It picks and assigns by maximising the minimum separation between series while keeping each readable against the background, and pins focal to the first series. The returned palette is ordered and prefix-nested (ordered_palette): the first m colours are themselves a good m-colour palette, so a panel with fewer series uses the first that many and the mapping stays consistent across panels. Read its rationale, shortfall, suggested_additions:

  • Available set too small for the series count → add the suggested additions/substitutions or collapse series, rather than reusing a hue.
  • Colours dropped for low background contrast → respect it; a light mark on a light ground is not a real option for a thin line (a large fill tolerates less).

Picking a subset from an available set is the normal case.

3a. Categorical series vs continuous magnitude - decide this first

Before calling anything, decide what colour encodes. Two different problems:

  • Categorical - colour tells apart series or categories (lines, bars, groups). N distinct colours. This is recommend_colours, everything above and below.
  • Continuous - colour encodes one ordered quantity (a heatmap/matrix fill, a choropleth, a colour-mapped value). This is not N series; it is a scale, chosen by hand with the rules below. Do not run a magnitude through recommend_colours - it collapses the variable to one series colour and judges the ramp's stops as if they were confusable series (a sequential ramp should have close neighbours). A heatmap of scores is the common trap.

For a continuous scale:

  • Sequential vs diverging. A one-sided magnitude (0-100 scores, counts, durations - higher is just more) has no intrinsic centre; sequential is the honest default. Reach for diverging when a midpoint carries meaning and separating low / middle / high aids the read - a signed quantity straddling zero, a value above/below a target, or a dense score matrix where a diverging ramp simply discriminates better. Diverging is often the better read for a matrix; choose it on that judgement, not by rote.
  • Midpoint from the data, never a constant. If an external reference exists (a target, a break-even, zero), that is the midpoint. Otherwise derive it from the data (the median), so the ramp splits these values, not an arbitrary 50. Diverge only when a real centre exists, or when you judge the split reads better for a score matrix.
  • Colours are recommended, not hardcoded. Poles come from the brand/context pool when there is one, chosen fresh only when there isn't. Never bake a fixed red-white-blue (or any fixed ramp) into the decision - let brand and background choose the hues. The two poles must stay apart in lightness so the extremes survive grayscale and CVD, and at least one end must read on the background.
  • Missing values are off the scale. NA cells get a distinct neutral, kept separate from a near-background diverging midpoint so an empty cell never reads as a mid-value one. Never leave missing cells to fall on a scale colour.

3b. Semantic colour - use it whenever it fits

When a series carries a colour meaning the reader already holds - a "loss" that reads red, an "ocean" that reads blue, a party or brand with a known colour - honour it; a semantically apt colour is understood before the legend. Reach for this by default when appropriate, and stand down only when something argues against it: the prompt or brand guidance says not to; the convention isn't shared by this audience (colour meaning is culture-relative - red is loss in US markets, gain in Indian and Chinese ones - so decide in context, never from a fixed table); or it costs accessibility (a red/green polarity collapsing under CVD - prefer blue/orange).

You own which series means what, and its away kit. Pass it as semantic_hints:

  • {"series_index": i, "colour": "#hex"} - a hard pin, for an exact colour (brand red, fixed party colour).
  • {"series_index": i, "hue_family": "blue"} - a soft family (the usual case): name the hue family and recommend_colours picks the nearest in-family colour from the available set, so brand and accessibility still shape the shade.
  • Add "alternates": [...] (colours or family words) as away kits for when a series' colour would clash.

Priority the tool enforces: (1) series stay distinguishable - the near-hard bar; (2) semantic meaning outranks accessibility - a soft family may take a low-contrast or CVD-weaker in-family colour and is honoured, not vetoed (the returned validation still flags it); (3) contrast/CVD/grayscale are soft diagnostics. Meaning wins over accessibility, but never at the cost of two series collapsing into one colour.

Away kits (the football rule). When two series' colours would clash, one keeps home and the other switches to an away kit - a different but still-its-own colour from alternates, not a mechanical darkening. Home is kept for hard pins, then focal, then the lower series_index; the clashing series takes the first away kit that separates. With no clearing away kit the tool keeps home and flags semantic_collision - it never silently reskins a series you didn't give an alternate for; supply one that still reads as its own, or merge the series. Read semantic_findings: semantic_unmet = no in-family colour available (add one or accept the separation pick); semantic_collision = resolve with an away kit. Hints make positions identity-bound, so the palette is no longer prefix-nested (prefix_nested: false) - expected. Use semantic colour where meaning earns a hue, not to colour every series.

4. Defaults and craft rules (when choosing freely)

  • Focal colour plus grey. One series focal; the rest muted grey context, unless every series genuinely competes for attention.
  • Adjacent regions differ in hue AND lightness - never hue alone, especially stacked or touching areas.
  • Don't rely on hue to carry meaning; avoid red-versus-green as the only distinction.
  • WCAG soft targets: ~4.5:1 normal text, 3:1 large text, 3:1 against background for small/thin essential marks. Diagnostic, not a gate.

5. Repair: source colours are a prior, not a rule

Read the source's dominant hues off the image. Treat them as a prior: feed them as the available set or a focal hint and keep the semantic mapping (which series a colour stands for), then override any specific hue freely for brand or accessibility. Preserve the mapping; don't defend the exact colours.

6. Validate and iterate

recommend_colours scores its own assignment and returns the result as validation: soft fails on background contrast, adjacent-series distinctness, CVD (deutan/protan/tritan), and grayscale, each with a concrete nudge. Act on them (lighten/darken to separate, or shift a hue, then pass the adjusted set back in as available) and look at the export once it is rendered. A soft_fail is guidance, not a stop - accessible multi-colour palettes on white are genuinely hard, so weigh the findings against how the chart is actually read.

Câu hỏi thường gặp

Kỹ năng AI Dataviz Color làm được gì?

Chọn và gán màu cho một biểu đồ cụ thể dựa trên độ tương phản, khả năng phân biệt các chuỗi, khả năng nhận biết với người mù màu và khi chuyển sang thang xám, cũng như cách làm nổi bật màu chủ đạo trên nền xám. Ưu tiên thương hiệu; WCAG chỉ là mục tiêu tham khảo.

Vì sao nên dùng Dataviz Color trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Dataviz Color là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Dataviz Color trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/skthewimp/karthik-data-visualization-skill/tree/main/dataviz-color/claude. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Dataviz Color?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Dataviz Color với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Dataviz Color với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Dataviz Color có miễn phí không?

Có. Kỹ năng này được skthewimp phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇