{
  "title": "Why a smooth gradient develops bands after compression",
  "article": "https://bitinz.com/guides/gradient-banding-test",
  "environment": {
    "measuredOn": "2026-11-16",
    "os": "macOS 27.0.1",
    "browser": "Google Chrome 157.0.8103.78, headless",
    "imagemagick": "7.1.1-47 Q16-HDRI",
    "libjpegTurbo": "3.2.0",
    "libwebp": "1.6.0",
    "exiftool": "12.57"
  },
  "results": {
    "gradient": {
      "size": "1200x360",
      "from": [
        24,
        40,
        64
      ],
      "to": [
        76,
        116,
        168
      ],
      "interpolation": "sRGB values",
      "eightBitDistinctColours": 225
    },
    "palette": {
      "requestedMaximum": 32,
      "colours": 16
    },
    "indexed256": {
      "file": "gradient-256.png",
      "coloursKept": 225,
      "decodedRGBIdentical": true,
      "rgbBytes": 1296000
    },
    "noise": {
      "seed": 20261116,
      "perPixel": "the same -1, 0 or +1 on all three channels"
    },
    "columnMeans": [
      {
        "file": "gradient-8.png",
        "largestAdjacentChannelStep": 1.0,
        "longestRunOfIdenticalColumnsPx": 12
      },
      {
        "file": "gradient.jpg",
        "largestAdjacentChannelStep": 5.0,
        "longestRunOfIdenticalColumnsPx": 25
      },
      {
        "file": "gradient.webp",
        "largestAdjacentChannelStep": 2.911111111111111,
        "longestRunOfIdenticalColumnsPx": 32
      },
      {
        "file": "palette-none.png",
        "largestAdjacentChannelStep": 11.0,
        "longestRunOfIdenticalColumnsPx": 143
      }
    ],
    "css": {
      "declaration": "background: linear-gradient(to right in srgb, #182840, #4c74a8);",
      "characters": 64
    }
  },
  "figures": [
    {
      "path": "/research/2026-11/gradient-banding-test/figures/detail-16-colours-dither.png",
      "bytes": 5029,
      "sha256": "6ee892989114900c7b9c0b02f455747387b9f32aa4cedb1fa3792ecc2b346d1b",
      "width": 600,
      "height": 240,
      "madeFrom": "palette-dither-4bit.png",
      "method": "Decoded in Chrome, region [400, 120, 200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 3× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/detail-16-colours.png",
      "bytes": 253,
      "sha256": "ee36c0aea754e9aa08961602f778525a7d9583a5667037442e932c89566a77ca",
      "width": 600,
      "height": 240,
      "madeFrom": "palette-none-4bit.png",
      "method": "Decoded in Chrome, region [400, 120, 200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 3× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/detail-8-bit-png.png",
      "bytes": 1001,
      "sha256": "5387b8987bd50f936f35942d79196fdb7bc8e391ff4c2173c83c42c7c5d7e764",
      "width": 600,
      "height": 240,
      "madeFrom": "gradient-8.png",
      "method": "Decoded in Chrome, region [400, 120, 200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 3× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/detail-jpeg.png",
      "bytes": 912,
      "sha256": "1f8ac798cba1f24a9795c38297af70a62dc14110bca0f487eac99ad57adbf982",
      "width": 600,
      "height": 240,
      "madeFrom": "gradient.jpg",
      "method": "Decoded in Chrome, region [400, 120, 200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 3× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/detail-webp.png",
      "bytes": 1553,
      "sha256": "554cc089ae0ccf6195182fcffaf4b41d43a6a81020c985c4fafbc45e2172adbd",
      "width": 600,
      "height": 240,
      "madeFrom": "gradient.webp",
      "method": "Decoded in Chrome, region [400, 120, 200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 3× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/newsletter-css.png",
      "bytes": 23842,
      "sha256": "e7fa57f435acfd4c882b89b992c737ec66af86116ae30c96e441a096acdab8b6",
      "width": 560,
      "height": 240,
      "method": "Cut from a Chrome screenshot of the test page."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/newsletter-png.png",
      "bytes": 14903,
      "sha256": "0bf1dc438a60af4f807eeab5c2f7423395bb0bc4c5150f3410186ff5c6cb000c",
      "width": 560,
      "height": 240,
      "method": "Cut from a Chrome screenshot of the test page."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-16-bit-png.png",
      "bytes": 1699,
      "sha256": "3bf611d4a7a2b7c1bd1ff5fc00829d1561f7cb67224171b19345ca9b5fdf46ec",
      "width": 1200,
      "height": 80,
      "madeFrom": "gradient-16.png",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-16-colours-dither.png",
      "bytes": 18222,
      "sha256": "85d0382784c99ef3c52a4edb6112aae929b6fc7c34912fe2e17a72c8237ef15c",
      "width": 1200,
      "height": 80,
      "madeFrom": "palette-dither-4bit.png",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-16-colours.png",
      "bytes": 440,
      "sha256": "8c4179dfe83149f3d07ad2d73f5b42f4a65e064bd6b7ba57b9160d4d3dc9611a",
      "width": 1200,
      "height": 80,
      "madeFrom": "palette-none-4bit.png",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-8-bit-png.png",
      "bytes": 1783,
      "sha256": "6928bf1b900fe57d3d958cb0cf773f671d19f20c4ad8d09e495042b53e7c35be",
      "width": 1200,
      "height": 80,
      "madeFrom": "gradient-8.png",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-jpeg.png",
      "bytes": 1364,
      "sha256": "0260f980f786cb22db13789e454a02db83cb4e3b1af603a60556e37eb15e99e5",
      "width": 1200,
      "height": 80,
      "madeFrom": "gradient.jpg",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-noise-jpeg.png",
      "bytes": 3089,
      "sha256": "94989f1264181881659c357ca7f2df1089d9d5f72905fa5f49a648ee21632de4",
      "width": 1200,
      "height": 80,
      "madeFrom": "noise.jpg",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-noise-png.png",
      "bytes": 48491,
      "sha256": "b6bae4060baa0dd41c27dd5650f4ac40da0db18a995299d20d903a154074c399",
      "width": 1200,
      "height": 80,
      "madeFrom": "gradient-noise.png",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-noise-webp.png",
      "bytes": 3294,
      "sha256": "b6ee0f92bda8454f0bc842363aa29612f68936a65de03ac2f59140c33c018676",
      "width": 1200,
      "height": 80,
      "madeFrom": "noise.webp",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    },
    {
      "path": "/research/2026-11/gradient-banding-test/figures/strip-webp.png",
      "bytes": 4026,
      "sha256": "753b4dc85a20197f8f70239f7276158dd6e73d2a8198d0fc46a46d16d1070bd8",
      "width": 1200,
      "height": 80,
      "madeFrom": "gradient.webp",
      "method": "Decoded in Chrome, region [0, 120, 1200, 80] (x, y, width, height) drawn into an sRGB canvas, enlarged 1× without smoothing; lossless PNG."
    }
  ],
  "commands": "/research/2026-11/gradient-banding-test/commands.sh",
  "files": [
    {
      "path": "/research/2026-11/gradient-banding-test/files/gradient-16.png",
      "bytes": 4250,
      "sha256": "0894d324e6bad69fdd22d15179dbf46cf3a54e9d0700dde7287fbc400468faf4"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/gradient-256.png",
      "bytes": 3575,
      "sha256": "4d7abce0d8ea6bd59f2bf3c1da43decb1a4e8312cc5e79904f83d8a5906c3d70"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/gradient-8.png",
      "bytes": 2067,
      "sha256": "196eea20189349cd2e37837acb539f1d2f7db89f354ad78aadfb58c2344b1523"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/gradient-noise.png",
      "bytes": 208038,
      "sha256": "f0d53efa3847d710d3942daedea2ae495105a76e145afc6ccb0cb49d5a166298"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/gradient.jpg",
      "bytes": 8019,
      "sha256": "1c62ceaddae12aa4084a3e42f3274280bd4b3a4646d15d3b1dd246addb625eef"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/gradient.webp",
      "bytes": 1404,
      "sha256": "603e26d10447ec8538a34eba0868e592a2270a3e2dbcb5f95f3ee1e97be5e92a"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/noise.jpg",
      "bytes": 8470,
      "sha256": "037c323d1fbbcfc4819947cb79002b7d9f8cf3efe3ccb2b35ab7418c4ad3df96"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/noise.webp",
      "bytes": 1422,
      "sha256": "9293e33b31d2b77187227e885ac589c80d1c61c35854815c818533a4badedd46"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/palette-32.png",
      "bytes": 134,
      "sha256": "91b4b99293ab6fcd1b3681f5f381abbdf6caa08d715676ceacecc9952cfde77b"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/palette-dither-4bit.png",
      "bytes": 78794,
      "sha256": "d343aade5a7cbbd94857c45f0b91a203521a895a6cb996edd08849e51929864c"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/palette-dither.png",
      "bytes": 78372,
      "sha256": "756c1959bf0365c103a33f0b5eaa73c585c8d7fec771a3cb67db2917424895c3"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/palette-none-4bit.png",
      "bytes": 1254,
      "sha256": "96e43bef3e3e0e6270172bc618aba0880c149b7693db45c366e0ef40fe04d169"
    },
    {
      "path": "/research/2026-11/gradient-banding-test/files/palette-none.png",
      "bytes": 2480,
      "sha256": "a7eb327cada5497869ec4fee63bacabbcc3bf808b1d2e4a692dbe1e53c51bda7"
    }
  ],
  "scripts": [
    {
      "path": "/research/2026-11/gradient-banding-test/make-gradient.py",
      "bytes": 1499,
      "sha256": "9b3b920f41a48845756e75d1279e66a9f0a7cc741bcdde9ebc3fa105f53c7539"
    }
  ]
}
