Returns the color as a String.<p>

@return the color as a String
762835
public String getColorString() {

        StringBuffer result = new StringBuffer();
        if (m_color == Simapi.COLOR_TRANSPARENT) {
            result.append(COLOR_TRANSPARENT);
        } else {
            if (m_color.getRed() < 16) {
                result.append('0');
            }
            result.append(Integer.toString(m_color.getRed(), 16));
            if (m_color.getGreen() < 16) {
                result.append('0');
            }
            result.append(Integer.toString(m_color.getGreen(), 16));
            if (m_color.getBlue() < 16) {
                result.append('0');
            }
            result.append(Integer.toString(m_color.getBlue(), 16));
        }
        return result.toString();
    }
439839
@NonNull
    public static SpannableString getColorText(@NonNull CharSequence content, int start, int end, @ColorInt int color) {
        SpannableString stringSpan = new SpannableString(content);
        stringSpan.setSpan(new ForegroundColorSpan(color), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        return stringSpan;
    }
1272360
public synchronized String getString() {
		// check state and initialize buffer
		if (outputFileName == null)
			throw new IllegalStateException();
		StringBuffer out = new StringBuffer();

		// start the SMAP
		out.append("SMAP\n");
		out.append(outputFileName + '\n');
		out.append(defaultStratum + '\n');

		// include embedded SMAPs
		if (doEmbedded) {
			int nEmbedded = embedded.size();
			for (int i = 0; i < nEmbedded; i++) {
				out.append(embedded.get(i));
			}
		}

		// print our StratumSections, FileSections, and LineSections
		int nStrata = strata.size();
		for (int i = 0; i < nStrata; i++) {
			SmapStratum s = strata.get(i);
			out.append(s.getString());
		}

		// end the SMAP
		out.append("*E\n");

		return out.toString();
	}
178411
public String charsToString() {
        return collect(StringBuilder::new, (sb, c) -> sb.append((char) c), StringBuilder::append).toString();
    }
1152415
def color_string(color, string):
    
    if not color_available:
        return string

    return color + string + colorama.Fore.RESET
56593
public String getString() 
    { // By default, get the data as-is
        String string = this.stripNonNumeric(super.getString());
        int dataLength = string.length();
        if (dataLength > 4)
            string = string.substring(0, 4) + "-" + string.substring(4);
        return string;
    }
558231
public function getColoredString(
        string $string,
        string $foreground_color = null,
        string $background_color = null,
        bool $header = true
    ):string {
        if ($header) {
            $title = "Console Manager - ".CoreManager::getCurrentModule();
            $titleSeparator = $this->copyContent("-", strlen($title) + 10);
            $string = "\n\n" . $title . "\n" . $titleSeparator . "\n\n" . $string . "\n";
        } else {
            $string = "\n\n" . $string . "\n";
        }
        $string = $this->resizeContent($string);
        $colored_string = "";


        // Check if given foreground color found
        if (isset($this->foreground_colors[$foreground_color])) {
            $colored_string .= "\033[" . $this->foreground_colors[$foreground_color] . "m";
        }
        // Check if given background color found
        if (isset($this->background_colors[$background_color])) {
            $colored_string .= "\033[" . $this->background_colors[$background_color] . "m";
        }

        // Add string and end coloring
        $colored_string .=  $string . "\033[0m";

        return ($colored_string);
    }
931428
public Color getBackgroundColor()
    {
        if (m_colorBackground == null)
        {
            String strBackgroundColor = this.getProperty(Params.BACKGROUNDCOLOR);   // Resource file
            if ((strBackgroundColor != null) && (strBackgroundColor.length() > 0))
                m_colorBackground = BaseApplet.nameToColor(strBackgroundColor);
        }
        if (m_colorBackground == null)
            m_colorBackground = SystemColor.window;     // Default color
        return m_colorBackground;
    }
138962
private String checkColor(String color) {

        if (color != null) {
            if (color.indexOf("#") == -1) {
                // add the "#" to the color string
                color = "#" + color;
            }
            int colLength = color.length();
            if ((colLength == 4) || (colLength == 7)) {
                return color;
            }
        }
        return "#FFFFFF";
    }
1188349
public static Color fromString(String value) {
    for (Converter converter : CONVERTERS) {
      Color color = converter.getColor(value);
      if (color != null) {
        return color;
      }
    }
    throw new IllegalArgumentException(
        String.format("Did not know how to convert %s into color", value)
    );
  }
1236030
public String asString() {
        String s = fromStringOrReader();
        if (s != null) return s;
        ByteBuffer bb = getByteBuffer();
        if (bb != null) return stringFrom(bb);
        InputStream is = fromStreamOrUrl();
        if (is != null) {
            Reader r = readerFrom(is);
            return stringFrom(r);
        }
        throw resourceUnaccessible();
    }
695263
private static String colorString(Color color) {
		return color.getRed() + "," + color.getGreen() + "," + color.getBlue()
				+ "," + color.getAlpha();
	}
43788
protected String createCssContentString() {
        StringBuilder css = new StringBuilder();
        css.append("<style>");

        // body
        css.append("body {");
        css.append("background-color: #152935;");
        css.append("font-family: serif;");
        css.append("margin: 0;");
        css.append("}\n");
        // #top, #bottom
        css.append("#top, #bottom {");
        css.append("padding: 20px;");
        css.append("}\n");
        css.append("");
        // #top-middle, #bottom-middle
        css.append("#top-middle, #bottom-middle {");
        css.append("background-color: #001428;");
        css.append("padding: 10px;");
        css.append("}\n");
        css.append("");
        // .container
        css.append(".container {");
        css.append("background-color: white;");
        css.append("padding: 20px 50px;");
        css.append("}\n");
        // .error
        css.append(".error {");
        css.append("color: red;");
        css.append("font-weight: bold;");
        css.append("}\n");

        css.append("</style>");
        return css.toString();
    }
1126782
public String getString()
    {
        StringBuffer    buf = new StringBuffer();

        for (int i = 0; i != string.length; i++)
        {
            buf.append(table[(string[i] >>> 4) % 0xf]);
            buf.append(table[string[i] & 0xf]);
        }

        return buf.toString();
    }
687687
public int getBackgroundColor() {
        return Color.argb(Colors.glToByte(getBackgroundColorA()), //
                Colors.glToByte(getBackgroundColorR()), //
                Colors.glToByte(getBackgroundColorG()), //
                Colors.glToByte(getBackgroundColorB()));
    }
62508
@Pure
	public static int getSelectionColor() {
		final Preferences prefs = Preferences.userNodeForPackage(BusLayerConstants.class);
		if (prefs != null) {
			final String str = prefs.get("SELECTION_COLOR", null); //$NON-NLS-1$
			if (str != null) {
				try {
					return Integer.valueOf(str);
				} catch (Throwable exception) {
					//
				}
			}
		}
		return DEFAULT_SELECTION_COLOR;
	}
780299
public String to_string() 
	{
		String str = "";
		if (pageno > 0) 
			str = "pageno="+pageno;
		
		if (pagesize > 0) 
		{
			if (str.length() > 0)
				str = str + "&";
			
			str = str +"pagesize="+pagesize;
		}
		
		if (detailview) 
		{
			if (str.length() > 0)
				str = str + "&";
			
			str = str +"view=detail";
		}
		
		if (count) 
		{
			if (str.length() > 0)
				str = str + "&";
			
			str = str +"count=yes";
		}
		
		if (args != null) {
			if (str.length() > 0)
				str = str + "&";
			str = str+"args="+args;
		}
		if (filter != null) {
			if (filter.length() > 0)
				str = str + "&";
			str = str+"filter="+filter;
		}
		return str;
	}