ColorPicker { public static Color contigColour(@NotNull final String contig) { return COLOR_MAP.getOrDefault(contig.replace("chr", ""), Color.BLACK); } private  ColorPicker(@NotNull final Map<Integer, String> colorMap, final boolean clusterMode, final double connectorTransparency); static Color contigColour(@NotNull final String contig); @NotNull static String hexContigColor(@NotNull final String contig); @NotNull static String hexColor(@NotNull final Color color); @NotNull static ColorPicker clusterColors(@NotNull final List<Link> links); @NotNull static ColorPicker chainColors(@NotNull final List<Link> links); @NotNull String transparentColor(final int clusterId, final int chainId); @NotNull String color(final int clusterId, final int chainId);  }
@Test public void testContigColours() { Color chr1Color = ColorPicker.contigColour("1"); assertNotEquals(Color.black, chr1Color); Color chr1ColorHg38 = ColorPicker.contigColour("chr1"); assertEquals(chr1Color, chr1ColorHg38); Color unknownColor = ColorPicker.contigColour("MT"); assertEquals(Color.black, unknownColor); }