public docScript composeForPalette(docScript script, Color baseColor, float bright, float sat, int hue, string title, bool doLabels = false) { script.x_moveToCorner(textCursorZoneCorner.Top); script.x_move(textCursorZoneCorner.Right, 1, true); script.x_moveToCorner(textCursorZoneCorner.Left); if (doLabels) { script.s_width(0, 13); } else { script.s_width(0, 23); } Color altOne = baseColor; //.getVariation(bright, sat, hue); aceColorPalette pal = new aceColorPalette(altOne.ColorToHex()); //.toHexColor()); if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, "Title"); script.AppendLine(); script.AppendLine(); script.AppendLine(appendType.heading_2, "Base color"); script.AppendLine(); script.AppendLine(appendType.regular, "Bright", appendRole.tableColumnHead); script.AppendLine(appendType.regular, "Saturation", appendRole.tableColumnFoot); script.AppendLine(appendType.regular, "Hue", appendRole.tableBetween); } else { script.AppendLine(appendType.heading_2, "Palette"); script.AppendLine(appendType.bold, title); script.AppendLine(); script.AppendLine(appendType.heading_2, "Base color", appendRole.tableColumnHead); script.s_settings(altOne, Color.Black); script.AppendLine(appendType.bold, pal.hexColor); script.AppendLine(appendType.heading_2, "Change"); script.AppendLine(appendType.regular, bright.ToString(), appendRole.tableColumnHead); script.AppendLine(appendType.regular, sat.ToString(), appendRole.tableColumnFoot); script.AppendLine(appendType.regular, hue.ToString(), appendRole.tableBetween); } if (doLabels) { script.AppendLine(appendType.regular, "bgColors"); } else { script.AppendLine(appendType.regular, "Background variations"); } for (int i = 0; i < pal.ccount; i++) { if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, i.ToString()); } else { script.AppendLine(appendType.bold, pal.bgColors[i].ColorToHex()); script.s_settings(pal, i, acePaletteShotResEnum.background).isHorizontal = false; } } if (doLabels) { script.AppendLine(appendType.regular, "tpColors"); } else { script.add(appendType.regular, "Border variations", false); } for (int i = 0; i < pal.ccount; i++) { if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, i.ToString()); } else { script.AppendLine(appendType.bold, pal.tpColors[i].ColorToHex()); script.s_settings(pal, i, acePaletteShotResEnum.border).isHorizontal = false; } } if (doLabels) { script.AppendLine(appendType.regular, "fgColors"); } else { script.add(appendType.regular, "Foreground variations", false); } for (int i = 0; i < pal.ccount; i++) { if (doLabels) { script.AppendLine(); script.AppendLine(appendType.bold, i.ToString()); } else { script.AppendLine(appendType.bold, pal.fgColors[i].ColorToHex()); script.s_settings(pal, i, acePaletteShotResEnum.foreground).isHorizontal = false; } } return(script); }