Character turns neon yellow when joining

I was casually trying to fix something related to player coloring. When a player joins, they should be either red, green, blue or yellow. They are neon yellow no matter what. I have a toon shader, the albedo value in the shader is changed only once. I have no idea how to fix it and it removes all of the shading.

player.gd

# initializer values
func _ready() -> void:
	player_color = game_autoload.get_free_color()
	animtree.set("parameters/walkdirblend/scale", 1.0)
	animtree.set("parameters/movement/blend_amount", 0.0)
	var auth := is_multiplayer_authority()
	camera.current = auth
	print(auth, name)
	set_process_unhandled_input(auth)
	set_physics_process(auth)
	if is_multiplayer_authority():
		$bean/Armature/Skeleton3D/Plane_001.set_layer_mask_value(1, false)
		$bean/Armature/Skeleton3D/Plane_001.set_layer_mask_value(2, true)
		camera.set_cull_mask_value(2, false)
	Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
	print($bean/Armature/Skeleton3D/Plane_001.get_surface_override_material(1))
	$bean/Armature/Skeleton3D/Plane_001.get_surface_override_material(1).set("shader_parameter/albedo", player_color)
# game controls

game_autoload.gd

extends Node

var reserved_colors = []
var free_colors = [Color(255, 0, 0),Color(255, 255, 0.0),Color(0.0, 255, 0.0),Color(0.0, 0.0, 255)]

# networking

func get_free_color():
	for i in range(len(free_colors)):
		if free_colors[i] not in reserved_colors:
			var resco = free_colors[i]
			free_colors.remove_at(i)
			reserved_colors.append(resco)
			return resco

Thanks! Please request clarification if I was unclear.

Shouldn’t you be using set_shader_parameter()?

Yes, it works too but I was too lazy to change it after testing.

So it’s working then?

No, the beans are yellow and unshaded.

Color takes values from 1.0 to 0.0, you are well over the expected maximum value so the colors are extra bright.

The stylized shading disappears completely and it’s supposed to choose a random color for each player, which it does now because I fixed it.