How to colour item text in Vanilla minecraft? [duplicate]

Recently, I have seen item names on servers and on this very website with odd characters preceding them. I was thinking "well, this changes everything!".

Can you make item name act like JSON text using this method? (i.e. any colour, bold, italic, obfuscated?)

Please list methods/preceders below.


Edit

What I am looking for is the colour of the item names, not sign block data or written books with coloured text. For example, when you go on a server, you often see items with coloured or obfuscated names.


Solution 1:

You can use a sign to run a command containing the section symbol (disguised as unicode \u00A7 because the actual "§" character cannot be typed in a command block), which formats the item's display name as desired. The following provides the player with a sign that, when right-clicked, provides the player with a stone that has an obfuscated name:

/give @p minecraft:sign 1 0 {BlockEntityTag:{Text1:"{\"text\":\"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/give @p minecraft:stone 1 0 {display:{Name:\\\"\u00A7r\u00A7kThis text is obfuscated.\\\"}}\"}}"}}

The formatting is reset first since it would otherwise be italic by default.

Solution 2:

It is currently not possible (as of version 1.11) to colour the names of items using colour/formatting codes without the use of mods.

You can, however, use the formatting codes in conjunction with the § character to colour the text in books and quills.

A reference of all the colour/formatting codes can be found below:

+-------+------------------+
| Code  |      Effect      |
+-------+------------------+
| §0    | Black            |
| §1    | Dark Blue        |
| §2    | Dark Green       |
| §3    | Dark Aqua        |
| §4    | Dark Red         |
| §5    | Dark Purple      |
| §6    | Gold             |
| §7    | Gray             |
| §8    | Dark Gray        |
| §9    | Blue             |
| §a    | Green            |
| §b    | Aqua             |
| §c    | Red              |
| §d    | Light Purple     |
| §e    | Yellow           |
| §f    | White            |
+-------+------------------+
| §k    | Obfuscated       |
| §l    | Bold             |
| §m    | Strikethrough    |
| §n    | Underline        |
| §o    | Italic           |
| §r    | Reset formatting |
+-------+------------------+

Codes sourced from Minecraft Wiki

Solution 3:

@FungusKing I would recommend using link as it will automatically generate signs, tellraws, books, etc. All you have to do is fill out the required fields.