To solve this optimization problem, we first need to define the decision variables and the objective function. Let's denote the number of Package 1 sold as `x` and the number of Package 2 sold as `y`. The profit per package is given, so our objective function will be to maximize `50x + 70y`.

The constraints come from the limited amount of blue and red fabric available. For blue fabric, each Package 1 uses 20 meters and each Package 2 uses 40 meters, with a total of 10000 meters available. This gives us the constraint `20x + 40y <= 10000`. Simplifying this, we get `5x + 10y <= 2500`.

For red fabric, each Package 1 uses 30 meters and each Package 2 uses 40 meters, with a total of 12000 meters available. This gives us the constraint `30x + 40y <= 12000`. Simplifying this, we get `3x + 4y <= 1200`.

We also need to consider that the number of packages sold cannot be negative, so we have `x >= 0` and `y >= 0`.

With these definitions and constraints in mind, we can write the Gurobi code as follows:

```python
from gurobipy import *

# Create a new model
m = Model("Fabric_Sales")

# Define the decision variables
x = m.addVar(lb=0, name="Package_1")
y = m.addVar(lb=0, name="Package_2")

# Define the objective function
m.setObjective(50*x + 70*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(5*x + 10*y <= 2500, name="Blue_Fabric_Constraint")
m.addConstr(3*x + 4*y <= 1200, name="Red_Fabric_Constraint")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Package 1: {x.x}")
    print(f"Package 2: {y.x}")
    print(f"Maximum Profit: {m.objVal}")
else:
    print("No optimal solution found")
```