Skip to content

Commit

Permalink
256 -> 255
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Sep 13, 2016
1 parent ffff52f commit 94e277b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const text_colors = AnyDict(
:bold => "\033[1m",
)

for i in 0:256
for i in 0:255
text_colors[i] = "\033[1m\033[38;5;$(i)m"
end

Expand All @@ -34,7 +34,7 @@ const available_text_colors_docstring =

"""Dictionary of color codes for the terminal.
Available colors are: $available_text_colors_docstring as well as the integers 0 to 256 inclusive.
Available colors are: $available_text_colors_docstring as well as the integers 0 to 255 inclusive.
"""
text_colors

Expand Down
2 changes: 1 addition & 1 deletion base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ end
Print strings in a color specified as a symbol.
`color` may take any of the values $(Base.available_text_colors_docstring)
or an integer between 0 and 256 inclusive. Note that not all terminals support 256 colors.
or an integer between 0 and 255 inclusive. Note that not all terminals support 256 colors.
"""
print_with_color(color::Union{Int, Symbol}, io::IO, msg::AbstractString...) =
with_output_color(print, color, io, msg...)
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/interacting-with-julia.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ prompt you can add something like the following to your ``juliarc.jl`` file::
Base.active_repl.prompt_color = Base.text_colors[:cyan]

The available color keys in ``Base.text_colors`` are ``:black``, ``:red``, ``:green``, ``:yellow``,
``:blue``, ``:magenta``, ``:cyan``, ``:white``, ``:normal``, and ``:bold`` as well as the integers 0 to 256 for terminals with 256 color support. Similarly, you can
``:blue``, ``:magenta``, ``:cyan``, ``:white``, ``:normal``, and ``:bold`` as well as the integers 0 to 255 for terminals with 256 color support. Similarly, you can
change the colors for the help and shell prompts and input and answer text by setting the
appropriate member of ``Base.active_repl`` (respectively, ``help_color``, ``shell_color``,
``input_color``, and ``answer_color``). For the latter two, be sure that the ``envcolors`` member
Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/io-network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ Text I/O
Print strings in a color specified as a symbol.

``color`` may take any of the values ``:normal``\ , ``:bold``\ , ``:black``\ , ``:blue``\ , ``:cyan``\ , ``:green``\ , ``:magenta``\ , ``:red``\ , ``:white``\ , or ``:yellow`` or an integer between 0 and 256 inclusive. Note that not all terminals support 256 colors.
``color`` may take any of the values ``:normal``\ , ``:bold``\ , ``:black``\ , ``:blue``\ , ``:cyan``\ , ``:green``\ , ``:magenta``\ , ``:red``\ , ``:white``\ , or ``:yellow`` or an integer between 0 and 255 inclusive. Note that not all terminals support 256 colors.

.. function:: info(msg...; prefix="INFO: ")

Expand Down

0 comments on commit 94e277b

Please sign in to comment.