public static String segmentIdHex(String segIdStr) {
        int segId = Integer.parseInt(segIdStr);
        return String.format("%06x", segId).toLowerCase();
    }
@Test
    public void testSegmentIdHex() {
        assertEquals("000001", segmentIdHex("1"));
        assertEquals("00000a", segmentIdHex("10"));
        assertEquals("ffffff", segmentIdHex("16777215"));
    }