colormaps-styling
БесплатноБез исполняемых скриптовНе проверенMaster color management and visual styling with Colorcet. Use this skill when selecting appropriate colormaps, creating accessible and colorblind-friendly…
Об этом скилле
Colormaps & Styling Skill
Overview
Master color management and visual styling with Colorcet and theme customization. Select appropriate colormaps, create accessible visualizations, and apply consistent application styling.
What is Colorcet?
Colorcet provides perceptually uniform colormaps designed for scientific visualization:
- Perceptually uniform: Changes in data correspond to proportional visual changes
- Colorblind-friendly: Palettes designed for accessibility
- Purpose-built: Specific colormaps for different data types
- HoloViz integration: Seamless use across HoloViews, Panel, and Bokeh
Quick Start
Installation
pip install colorcet
Basic Usage
import colorcet as cc
from colorcet import cm
import holoviews as hv
hv.extension('bokeh')
# Use a colormap
data.hvplot.scatter('x', 'y', c='value', cmap=cm['cet_goertzel'])
Core Concepts
1. Colormap Categories
Sequential: Single hue, increasing intensity
# Blues, greens, reds, grays
data.hvplot('x', 'y', c='value', cmap=cm['cet_blues'])
Diverging: Two hues from center point
# Emphasize positive/negative
data.hvplot('x', 'y', c='value', cmap=cm['cet_coolwarm'])
Categorical: Distinct colors for categories
# Qualitative data
data.hvplot('x', 'y', c='category', cmap=cc.palette['tab10'])
Cyclic: Wraps around for angular data
# Angles, directions, phases
data.hvplot('x', 'y', c='angle', cmap=cm['cet_cyclic_c1'])
See: Colormap Reference for complete catalog
2. Accessibility
Colorblind-safe palettes:
# Deuteranopia (red-green)
cmap=cm['cet_d4']
# Protanopia (red-green)
cmap=cm['cet_p3']
# Tritanopia (blue-yellow)
cmap=cm['cet_t10']
# Grayscale-safe
cmap=cm['cet_gray_r']
See: Accessibility Guide for comprehensive guidelines
3. Colormap Selection Guide
| Data Type | Recommended Colormap | Example |
|---|---|---|
| Single channel (positive) | cet_blues, cet_gray_r |
Temperature, density |
| Diverging (±) | cet_coolwarm, cet_bwy |
Correlation, anomalies |
| Categorical | tab10, tab20 |
Categories, labels |
| Angular | cet_cyclic_c1 |
Wind direction, phase |
| Full spectrum | cet_goertzel |
General purpose |
4. HoloViews Styling
import holoviews as hv
# Apply colormap
scatter = hv.Scatter(data, 'x', 'y', vdims=['value']).opts(
color=hv.dim('value').norm(),
cmap=cm['cet_goertzel'],
colorbar=True,
width=600,
height=400
)
# Style options
scatter.opts(
size=5,
alpha=0.7,
tools=['hover'],
title='My Plot'
)
See: HoloViews Styling for advanced customization
5. Panel Themes
import panel as pn
# Apply theme
pn.extension(design='material')
# Custom theme
pn.config.theme = 'dark'
# Accent color
template = pn.template.FastListTemplate(
title='My App',
accent='#00aa41'
)
See: Panel Themes for theme customization
Common Patterns
Pattern 1: Heatmap with Diverging Colormap
import holoviews as hv
from colorcet import cm
heatmap = hv.HeatMap(data, ['x', 'y'], 'value').opts(
cmap=cm['cet_coolwarm'],
colorbar=True,
width=600,
height=400,
tools=['hover']
)
Pattern 2: Categorical Color Assignment
import panel as pn
from colorcet import palette
categories = ['A', 'B', 'C', 'D']
colors = palette['tab10'][:len(categories)]
color_map = dict(zip(categories, colors))
plot = data.hvplot('x', 'y', c='category', cmap=color_map)
Pattern 3: Consistent App Styling
import panel as pn
# Set global theme
pn.extension(design='material')
# Custom CSS
pn.config.raw_css.append("""
.card {
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
""")
# Accent color throughout
accent = '#00aa41'
template = pn.template.FastListTemplate(
title='My Dashboard',
accent=accent
)
Pattern 4: Responsive Colorbar
from holoviews import opts
plot = data.hvplot.scatter('x', 'y', c='value', cmap=cm['cet_blues']).opts(
colorbar=True,
colorbar_opts={
'title': 'Value',
'width': 10,
'ticker': {'desired_num_ticks': 5}
}
)
Pattern 5: Colorblind-Safe Visualization
from colorcet import cm
# Use colorblind-safe diverging palette
plot = data.hvplot('x', 'y', c='value', cmap=cm['cet_d4']).opts(
title='Colorblind-Safe Visualization',
width=600,
height=400
)
# Alternative: Use patterns/hatching
plot.opts(hatch_pattern='/')
Best Practices
1. Match Colormap to Data Type
# ✅ Good: Sequential for positive values
temp_plot = data.hvplot(c='temperature', cmap=cm['cet_fire'])
# ✅ Good: Diverging for centered data
correlation = data.hvplot(c='correlation', c
Установить colormaps-styling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл colormaps-styling?
Master color management and visual styling with Colorcet. Use this skill when selecting appropriate colormaps, creating accessible and colorblind-friendly visualizations, applying consistent themes, or customizing plot aesthetics with perceptually uniform color palettes.
Как установить скилл colormaps-styling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл colormaps-styling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic