---
title: "chalkSketch"
description: "The chalk-drawing look: edges become chalk strokes and dark areas fill with cross-hatching."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.stylize"
categorySlug: "effects-stylize"
categoryTitle: "Stylize"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/stylize.ts#L260"
---

# chalkSketch

The chalk-drawing look: edges become chalk strokes and dark areas fill with cross-hatching.

```ts
chalkSketch(slots: {
    edges: SobelRing
    sensitivity: PropRef
    hatchScale: PropRef
    shading: PropRef
    grain: PropRef
    board: PropRef
    chalk: PropRef
}): GatherEffect
```

Import `effects` from `shaders/std` and use `effects.stylize.chalkSketch`.

Closes the recipe and returns the effect for `effect:`. `sensitivity` (0 to 1) sets how faint an edge still draws. `hatchScale` is the hatch line spacing in device pixels. `shading` (0 to 1) is how much cross-hatch fills the dark regions and `grain` (0 to 1) how dusty the strokes are. `board` and `chalk` are colors. Alpha follows the layer inside.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{
    edges: SobelRing
    sensitivity: PropRef
    hatchScale: PropRef
    shading: PropRef
    grain: PropRef
    board: PropRef
    chalk: PropRef
}` |  |

## Example

```ts
effect: chalkSketch({edges: sobelTaps({spacing: p('edgeThickness')}), sensitivity: p('edgeSensitivity'), hatchScale: p('hatchScale'), shading: p('shading'), grain: p('grain'), board: p('boardColor'), chalk: p('chalkColor')})
```

## See also

- [`sobelTaps`](/docs/primitives/effects-stylize/sobeltaps) — Eight brightness samples in a ring around each pixel, for finding edges.
- [`linework`](/docs/primitives/effects-stylize/linework) — The engraving look: the layer inside redrawn as ink lines that swell where it is dark.

## Used by

[Chalkboard](/docs/components/chalkboard)